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 | c34348a7ef1a6b3f92a644a227953800cd1f9947 (patch) | |
tree | 5c41fb25b5d08155409083ea9d8987f68513470c /lib/Sema/SemaTemplate.cpp | |
parent | 5fa05cb906e9ddd34ef2ae2a872014aeaf4bc04d (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/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index d75a1f1503..474a18df7f 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -3611,7 +3611,7 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, = NestedNameSpecifier::Create(Context, 0, false, ClassType.getTypePtr()); CXXScopeSpec SS; - SS.Adopt(Qualifier, Loc); + SS.MakeTrivial(Context, Qualifier, Loc); // The actual value-ness of this is unimportant, but for // internal consistency's sake, references to instance methods @@ -5998,7 +5998,7 @@ Sema::CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, SourceRange NNSRange, SourceLocation IILoc) { CXXScopeSpec SS; - SS.Adopt(NNS, NNSRange); + SS.MakeTrivial(Context, NNS, NNSRange); DeclContext *Ctx = computeDeclContext(SS); if (!Ctx) { @@ -6177,7 +6177,7 @@ bool Sema::RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS) { Rebuilder.TransformNestedNameSpecifier(NNS, SS.getRange()); if (!Rebuilt) return true; - SS.Adopt(Rebuilt, SS.getRange()); + SS.MakeTrivial(Context, Rebuilt, SS.getRange()); return false; } |