aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-04 19:04:38 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-04 19:04:38 +0000
commit21e413fe6305a198564d436ac515497716c47844 (patch)
tree16c83e7fbbb9cbd1b1d6f9a903caadf9e436cb43 /lib/Sema/TreeTransform.h
parentc9d557301cc910d0562876e6a7b4595e3d2fb846 (diff)
Use the real keyword location when rebuilding an elaborated type instead of
making something up. Fixes PR8129. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index d318bc6e5c..41d8f2a711 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -522,7 +522,8 @@ public:
/// By default, builds a new ElaboratedType type from the keyword,
/// the nested-name-specifier and the named type.
/// Subclasses may override this routine to provide different behavior.
- QualType RebuildElaboratedType(ElaboratedTypeKeyword Keyword,
+ QualType RebuildElaboratedType(SourceLocation KeywordLoc,
+ ElaboratedTypeKeyword Keyword,
NestedNameSpecifier *NNS, QualType Named) {
return SemaRef.Context.getElaboratedType(Keyword, NNS, Named);
}
@@ -3340,7 +3341,8 @@ TreeTransform<Derived>::TransformElaboratedType(TypeLocBuilder &TLB,
if (getDerived().AlwaysRebuild() ||
NNS != T->getQualifier() ||
NamedT != T->getNamedType()) {
- Result = getDerived().RebuildElaboratedType(T->getKeyword(), NNS, NamedT);
+ Result = getDerived().RebuildElaboratedType(TL.getKeywordLoc(),
+ T->getKeyword(), NNS, NamedT);
if (Result.isNull())
return QualType();
}