aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-24 00:49:34 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-24 00:49:34 +0000
commit9ddba32f25c0315cd3a6c7b63e0275b27cc1d973 (patch)
tree1ed103acd161d72be78ffbf3906c8b01d600e4f1 /lib/Sema/SemaTemplate.cpp
parent2e4c34ac53d08633b9473df921db4c7e4c9cd577 (diff)
Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index f0a0103205..ab6dde5eb1 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -3610,7 +3610,7 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg,
= NestedNameSpecifier::Create(Context, 0, false,
ClassType.getTypePtr());
CXXScopeSpec SS;
- SS.setScopeRep(Qualifier);
+ SS.Adopt(Qualifier, Loc);
// The actual value-ness of this is unimportant, but for
// internal consistency's sake, references to instance methods
@@ -5997,8 +5997,7 @@ Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword,
SourceLocation KeywordLoc, SourceRange NNSRange,
SourceLocation IILoc) {
CXXScopeSpec SS;
- SS.setScopeRep(NNS);
- SS.setRange(NNSRange);
+ SS.Adopt(NNS, NNSRange);
DeclContext *Ctx = computeDeclContext(SS);
if (!Ctx) {
@@ -6177,7 +6176,7 @@ bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS) {
Rebuilder.TransformNestedNameSpecifier(NNS, SS.getRange());
if (!Rebuilt) return true;
- SS.setScopeRep(Rebuilt);
+ SS.Adopt(Rebuilt, SS.getRange());
return false;
}