diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-24 17:54:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-24 17:54:50 +0000 |
commit | 869ad45f8f0e9019556463ff0fd9fab3d7127512 (patch) | |
tree | 12ee87ed78312514cde60e894b5add95a6f67517 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | e721185799a59944f4ee3ff9cf367f51c296c70f (diff) | |
download | bcm5719-llvm-869ad45f8f0e9019556463ff0fd9fab3d7127512.tar.gz bcm5719-llvm-869ad45f8f0e9019556463ff0fd9fab3d7127512.zip |
Retain complete source-location information for C++
nested-name-specifiers throughout the parser, and provide a new class
(NestedNameSpecifierLoc) that contains a nested-name-specifier along
with its type-source information.
Right now, this information is completely useless, because we don't
actually store the source-location information anywhere in the
AST. Call this Step 1/N.
llvm-svn: 126391
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 73511fbc7a4..de4cd46e7a9 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -670,7 +670,7 @@ Decl *TemplateDeclInstantiator::VisitClassTemplateDecl(ClassTemplateDecl *D) { if (isFriend) { if (Qualifier) { CXXScopeSpec SS; - SS.Adopt(Qualifier, Pattern->getQualifierRange()); + SS.MakeTrivial(SemaRef.Context, Qualifier, Pattern->getQualifierRange()); DC = SemaRef.computeDeclContext(SS); if (!DC) return 0; } else { @@ -983,7 +983,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D, DC = Owner; else if (isFriend && Qualifier) { CXXScopeSpec SS; - SS.Adopt(Qualifier, D->getQualifierRange()); + SS.MakeTrivial(SemaRef.Context, Qualifier, D->getQualifierRange()); DC = SemaRef.computeDeclContext(SS); if (!DC) return 0; } else { @@ -1272,7 +1272,7 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D, if (isFriend) { if (Qualifier) { CXXScopeSpec SS; - SS.Adopt(Qualifier, D->getQualifierRange()); + SS.MakeTrivial(SemaRef.Context, Qualifier, D->getQualifierRange()); DC = SemaRef.computeDeclContext(SS); if (DC && SemaRef.RequireCompleteDeclContext(SS, DC)) @@ -1688,7 +1688,7 @@ Decl *TemplateDeclInstantiator::VisitUsingDecl(UsingDecl *D) { D->isTypeName()); CXXScopeSpec SS; - SS.Adopt(NNS, D->getNestedNameRange()); + SS.MakeTrivial(SemaRef.Context, NNS, D->getNestedNameRange()); if (CheckRedeclaration) { Prev.setHideTags(false); @@ -1756,7 +1756,7 @@ Decl * TemplateDeclInstantiator return 0; CXXScopeSpec SS; - SS.Adopt(NNS, D->getTargetNestedNameRange()); + SS.MakeTrivial(SemaRef.Context, NNS, D->getTargetNestedNameRange()); // Since NameInfo refers to a typename, it cannot be a C++ special name. // Hence, no tranformation is required for it. @@ -1782,7 +1782,7 @@ Decl * TemplateDeclInstantiator return 0; CXXScopeSpec SS; - SS.Adopt(NNS, D->getTargetNestedNameRange()); + SS.MakeTrivial(SemaRef.Context, NNS, D->getTargetNestedNameRange()); DeclarationNameInfo NameInfo = SemaRef.SubstDeclarationNameInfo(D->getNameInfo(), TemplateArgs); |