Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Builtins.cpp b/lib/AST/Builtins.cpp
index 4655cf3..7eab267 100644
--- a/lib/AST/Builtins.cpp
+++ b/lib/AST/Builtins.cpp
@@ -183,7 +183,7 @@
if (Type->isArrayType()) {
Type = Context.getArrayDecayedType(Type);
} else {
- Type = Context.getReferenceType(Type);
+ Type = Context.getLValueReferenceType(Type);
}
break;
case 'V': {
@@ -224,8 +224,9 @@
Type = Context.getPointerType(Type);
break;
case '&':
- Type = Context.getReferenceType(Type);
+ Type = Context.getLValueReferenceType(Type);
break;
+ // FIXME: There's no way to have a built-in with an rvalue ref arg.
case 'C':
Type = Type.getQualifiedType(QualType::Const);
break;