diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-28 05:49:21 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-28 05:49:21 +0000 |
commit | f038fc2c12efb7d8594ed6ce63acd6dc0d9ac556 (patch) | |
tree | a4341ac1a042dd047a0a7ed8e229fb44f5e22daa /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | a468a12dfa77acc8ca325c63346a5c679965c459 (diff) | |
download | bcm5719-llvm-f038fc2c12efb7d8594ed6ce63acd6dc0d9ac556.tar.gz bcm5719-llvm-f038fc2c12efb7d8594ed6ce63acd6dc0d9ac556.zip |
Create UnresolvedUsingDecls.
llvm-svn: 80346
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 51f8fa56977..602caf28257 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2127,13 +2127,9 @@ NamedDecl *Sema::BuildUsingDeclaration(SourceLocation UsingLoc, assert(!SS.isInvalid() && "Invalid CXXScopeSpec."); assert(IdentLoc.isValid() && "Invalid TargetName location."); - // FIXME: Implement this properly! - if (isUnknownSpecialization(SS)) { - Diag(IdentLoc, diag::err_using_dependent_unsupported); - delete AttrList; - return 0; - } - + // FIXME: We ignore attributes for now. + delete AttrList; + if (SS.isEmpty()) { Diag(IdentLoc, diag::err_using_requires_qualname); return 0; @@ -2142,6 +2138,12 @@ NamedDecl *Sema::BuildUsingDeclaration(SourceLocation UsingLoc, NestedNameSpecifier *NNS = static_cast<NestedNameSpecifier *>(SS.getScopeRep()); + if (isUnknownSpecialization(SS)) { + return UnresolvedUsingDecl::Create(Context, CurContext, UsingLoc, + SS.getRange(), NNS, + IdentLoc, Name, IsTypeName); + } + DeclContext *LookupContext = 0; if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(CurContext)) { @@ -2202,9 +2204,6 @@ NamedDecl *Sema::BuildUsingDeclaration(SourceLocation UsingLoc, return 0; } - // FIXME: We ignore attributes for now. - delete AttrList; - return UsingDecl::Create(Context, CurContext, IdentLoc, SS.getRange(), ND->getLocation(), UsingLoc, ND, NNS, IsTypeName); } |