aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-25 16:07:42 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-25 16:07:42 +0000
commit7e384943ac136f6c2ea55c309108b83939cd4c21 (patch)
tree12b688d2d88e7719703f78e8be15525f85c4fd40 /lib/Sema/SemaTemplate.cpp
parent5149f37cfc736d03233bf92b5ba7c6e866c6647b (diff)
Switch a few CXXScopeSpec::MakeTrivial() calls over to appropriate
NestedNameSpecifierLoc handling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 5b09dfcee1..446eb9ed6d 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -6167,16 +6167,18 @@ ExprResult Sema::RebuildExprInCurrentInstantiation(Expr *E) {
}
bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS) {
- if (SS.isInvalid()) return true;
+ if (SS.isInvalid())
+ return true;
- NestedNameSpecifier *NNS = static_cast<NestedNameSpecifier*>(SS.getScopeRep());
+ NestedNameSpecifierLoc QualifierLoc = SS.getWithLocInContext(Context);
CurrentInstantiationRebuilder Rebuilder(*this, SS.getRange().getBegin(),
DeclarationName());
- NestedNameSpecifier *Rebuilt =
- Rebuilder.TransformNestedNameSpecifier(NNS, SS.getRange());
- if (!Rebuilt) return true;
+ NestedNameSpecifierLoc Rebuilt
+ = Rebuilder.TransformNestedNameSpecifierLoc(QualifierLoc);
+ if (!Rebuilt)
+ return true;
- SS.MakeTrivial(Context, Rebuilt, SS.getRange());
+ SS.Adopt(Rebuilt);
return false;
}