[cfe-commits] r80413 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/SemaCXX/using-decl-templates.cpp
Anders Carlsson
andersca at mac.com
Fri Aug 28 18:06:33 PDT 2009
Author: andersca
Date: Fri Aug 28 20:06:32 2009
New Revision: 80413
URL: http://llvm.org/viewvc/llvm-project?rev=80413&view=rev
Log:
CreateDeclRefExprs that point to UnresolvedUsingDecls.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/SemaCXX/using-decl-templates.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=80413&r1=80412&r2=80413&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Aug 28 20:06:32 2009
@@ -1036,6 +1036,11 @@
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
Modified: cfe/trunk/test/SemaCXX/using-decl-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/using-decl-templates.cpp?rev=80413&r1=80412&r2=80413&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/using-decl-templates.cpp (original)
+++ cfe/trunk/test/SemaCXX/using-decl-templates.cpp Fri Aug 28 20:06:32 2009
@@ -28,3 +28,9 @@
};
template<typename T> void D<T>::f() { }
+
+template<typename T> struct E : A<T> {
+ using A<T>::f;
+
+ void g() { f(); }
+};
More information about the cfe-commits
mailing list