summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-20 16:08:06 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-20 16:08:06 +0000
commit7a2a116bab8322fd07a1c314690ee487e2aa71aa (patch)
tree94c50954693517869ba42a542ad7c1e2c8d11ca1 /clang/lib/Sema/SemaInit.cpp
parent6e5a54b36c083542d8f987929111043a0afb1c07 (diff)
downloadbcm5719-llvm-7a2a116bab8322fd07a1c314690ee487e2aa71aa.tar.gz
bcm5719-llvm-7a2a116bab8322fd07a1c314690ee487e2aa71aa.zip
Add some tests for reference-collapsing and referencing binding
involving rvalue references, to start scoping out what is and what isn't implemented. In the process, tweak some standards citations, type desugaring, and teach the tentative parser about && in ptr-operator. llvm-svn: 123913
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 9130603d560..9593489b806 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -2575,9 +2575,7 @@ static void TryReferenceInitialization(Sema &S,
// - Otherwise, the reference shall be an lvalue reference to a
// non-volatile const type (i.e., cv1 shall be const), or the reference
- // shall be an rvalue reference and the initializer expression shall
- // be an rvalue or have a function type.
- // We handled the function type stuff above.
+ // shall be an rvalue reference.
if (!((isLValueRef && T1Quals.hasConst() && !T1Quals.hasVolatile()) ||
(isRValueRef && InitCategory.isRValue()))) {
if (S.Context.getCanonicalType(T2) == S.Context.OverloadTy)
OpenPOWER on IntegriCloud