aboutsummaryrefslogtreecommitdiff
path: root/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
commit69d831645f429d3b806d2ae220aee45ca44f8c6c (patch)
treec064d5bc12d23eac2da714f8dbc0ff8a7a23cdfd /lib/Sema/SemaInit.cpp
parentba4f5d5754c8291690d01ca9581926673d69b24c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 9130603d56..9593489b80 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/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)