aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-26 05:01:58 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-26 05:01:58 +0000
commitc938c1668b4fd12af154e965dd935a89e4801a70 (patch)
tree18f571ca026a157117dd0d09a1322462e69a1554 /lib/AST/Type.cpp
parent5811f5978feaa7b89bd89e174fa7ad077b48413e (diff)
Rvalue references for *this:
- Add ref-qualifiers to the type system; they are part of the canonical type. Print & profile ref-qualifiers - Translate the ref-qualifier from the Declarator chunk for functions to the function type. - Diagnose mis-uses of ref-qualifiers w.r.t. static member functions, free functions, constructors, destructors, etc. - Add serialization and deserialization of ref-qualifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index d8939cc123..36d501577c 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1112,7 +1112,8 @@ llvm::StringRef FunctionType::getNameForCallConv(CallingConv CC) {
FunctionProtoType::FunctionProtoType(QualType result, const QualType *args,
unsigned numArgs, QualType canonical,
const ExtProtoInfo &epi)
- : FunctionType(FunctionProto, result, epi.Variadic, epi.TypeQuals, canonical,
+ : FunctionType(FunctionProto, result, epi.Variadic, epi.TypeQuals,
+ epi.RefQualifier, canonical,
result->isDependentType(),
result->isVariablyModifiedType(),
result->containsUnexpandedParameterPack(),
@@ -1162,6 +1163,7 @@ void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result,
ID.AddPointer(ArgTys[i].getAsOpaquePtr());
ID.AddBoolean(epi.Variadic);
ID.AddInteger(epi.TypeQuals);
+ ID.AddInteger(epi.RefQualifier);
if (epi.HasExceptionSpec) {
ID.AddBoolean(epi.HasAnyExceptionSpec);
for (unsigned i = 0; i != epi.NumExceptions; ++i)