]> granicus.if.org Git - clang/commitdiff
CreateDeclRefExprs that point to UnresolvedUsingDecls.
authorAnders Carlsson <andersca@mac.com>
Sat, 29 Aug 2009 01:06:32 +0000 (01:06 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 29 Aug 2009 01:06:32 +0000 (01:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80413 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp
test/SemaCXX/using-decl-templates.cpp

index 91c1fa5a1225054b743be5c0077615090ba9d1c0..474ddf06355e932a7ac5bc864bbd77f974eb07c3 100644 (file)
@@ -1036,6 +1036,11 @@ Sema::BuildDeclarationNameExpr(SourceLocation Loc, NamedDecl *D,
   else if (TemplateDecl *Template = dyn_cast<TemplateDecl>(D))
     return BuildDeclRefExpr(Template, Context.OverloadTy, Loc,
                             false, false, SS);
+  else if (UnresolvedUsingDecl *UD = dyn_cast<UnresolvedUsingDecl>(D))
+    return BuildDeclRefExpr(UD, Context.DependentTy, Loc, 
+                            /*TypeDependent=*/true, 
+                            /*ValueDependent=*/true, SS);
+
   ValueDecl *VD = cast<ValueDecl>(D);
 
   // Check whether this declaration can be used. Note that we suppress
index 42442e28606593b8a5b660ecd9fdaa7349f25c71..1a53704c1e6819897bbb7328386d6d3a2650aafd 100644 (file)
@@ -28,3 +28,9 @@ template <typename T> struct D : A<T> {
 };
 
 template<typename T> void D<T>::f() { }
+
+template<typename T> struct E : A<T> {
+  using A<T>::f;
+
+  void g() { f(); }
+};