aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-24 17:54:50 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-24 17:54:50 +0000
commitc34348a7ef1a6b3f92a644a227953800cd1f9947 (patch)
tree5c41fb25b5d08155409083ea9d8987f68513470c /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent5fa05cb906e9ddd34ef2ae2a872014aeaf4bc04d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 73511fbc7a..de4cd46e7a 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/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);