aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-01 17:25:47 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-01 17:25:47 +0000
commit2786864406af0f3ec65b300675c6f3c809c22fd7 (patch)
tree98572346a020d3f7f06f27f923489b2504d05b26 /lib/Sema/SemaTemplate.cpp
parent90566c0e7b61de9bdfdf66f6dee440adb4e5b631 (diff)
Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index a710f94436..afb78170c9 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -1821,12 +1821,12 @@ TypeResult Sema::ActOnTagTemplateIdType(CXXScopeSpec &SS,
ElaboratedTypeKeyword Keyword
= TypeWithKeyword::getKeywordForTagTypeKind(TagKind);
- QualType ElabType = Context.getElaboratedType(Keyword, SS.getScopeRep(), Type);
+ QualType ElabType = Context.getElaboratedType(Keyword, /*NNS=*/0, Type);
TypeSourceInfo *ElabDI = Context.CreateTypeSourceInfo(ElabType);
ElaboratedTypeLoc TL = cast<ElaboratedTypeLoc>(ElabDI->getTypeLoc());
TL.setKeywordLoc(TagLoc);
- TL.setQualifierLoc(SS.getWithLocInContext(Context));
+ TL.setQualifierRange(SS.getRange());
TL.getNamedTypeLoc().initializeFullCopy(DI->getTypeLoc());
return CreateParsedType(ElabType, ElabDI);
}
@@ -5910,8 +5910,8 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
<< FixItHint::CreateRemoval(TypenameLoc);
NestedNameSpecifierLoc QualifierLoc = SS.getWithLocInContext(Context);
- QualType T = CheckTypenameType(TypenameLoc.isValid()? ETK_Typename : ETK_None,
- TypenameLoc, QualifierLoc, II, IdLoc);
+ QualType T = CheckTypenameType(ETK_Typename, TypenameLoc, QualifierLoc,
+ II, IdLoc);
if (T.isNull())
return true;
@@ -5924,7 +5924,7 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
} else {
ElaboratedTypeLoc TL = cast<ElaboratedTypeLoc>(TSI->getTypeLoc());
TL.setKeywordLoc(TypenameLoc);
- TL.setQualifierLoc(QualifierLoc);
+ TL.setQualifierRange(SS.getRange());
cast<TypeSpecTypeLoc>(TL.getNamedTypeLoc()).setNameLoc(IdLoc);
}
@@ -5996,8 +5996,7 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
T = Context.getElaboratedType(ETK_Typename, SS.getScopeRep(), T);
ElaboratedTypeLoc TL = Builder.push<ElaboratedTypeLoc>(T);
TL.setKeywordLoc(TypenameLoc);
- TL.setQualifierLoc(SS.getWithLocInContext(Context));
-
+ TL.setQualifierRange(SS.getRange());
TypeSourceInfo *TSI = Builder.getTypeSourceInfo(Context, T);
return CreateParsedType(T, TSI);
}