aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-26 16:15:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-26 16:15:35 +0000
commita2c3646c35dd09d21b74826240aa916545b1873f (patch)
treee2a57dcc3d41734ea9734c76a9d759c8951392f4 /lib/Sema/TreeTransform.h
parentbebf5b1bcfbf591dd3cd80c4aebd6486bb34f41c (diff)
Implement C++1y decltype(auto).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 97316f89b3..c0bc34fa97 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -754,17 +754,17 @@ public:
UnaryTransformType::UTTKind UKind,
SourceLocation Loc);
- /// \brief Build a new C++0x decltype type.
+ /// \brief Build a new C++11 decltype type.
///
/// By default, performs semantic analysis when building the decltype type.
/// Subclasses may override this routine to provide different behavior.
QualType RebuildDecltypeType(Expr *Underlying, SourceLocation Loc);
- /// \brief Build a new C++0x auto type.
+ /// \brief Build a new C++11 auto type.
///
/// By default, builds a new AutoType with the given deduced type.
- QualType RebuildAutoType(QualType Deduced) {
- return SemaRef.Context.getAutoType(Deduced);
+ QualType RebuildAutoType(QualType Deduced, bool IsDecltypeAuto) {
+ return SemaRef.Context.getAutoType(Deduced, IsDecltypeAuto);
}
/// \brief Build a new template specialization type.
@@ -3407,7 +3407,7 @@ TreeTransform<Derived>::TransformQualifiedType(TypeLocBuilder &TLB,
Qs.removeObjCLifetime();
Deduced = SemaRef.Context.getQualifiedType(Deduced.getUnqualifiedType(),
Qs);
- Result = SemaRef.Context.getAutoType(Deduced);
+ Result = SemaRef.Context.getAutoType(Deduced, AutoTy->isDecltypeAuto());
TLB.TypeWasModifiedSafely(Result);
} else {
// Otherwise, complain about the addition of a qualifier to an
@@ -4501,7 +4501,7 @@ QualType TreeTransform<Derived>::TransformAutoType(TypeLocBuilder &TLB,
QualType Result = TL.getType();
if (getDerived().AlwaysRebuild() || NewDeduced != OldDeduced) {
- Result = getDerived().RebuildAutoType(NewDeduced);
+ Result = getDerived().RebuildAutoType(NewDeduced, T->isDecltypeAuto());
if (Result.isNull())
return QualType();
}