summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-references.cpp
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2015-01-27 18:47:05 +0000
committerLarisse Voufo <lvoufo@google.com>2015-01-27 18:47:05 +0000
commit19d08672844ee7558910d9880555b111fc3c90b3 (patch)
tree2a0eb5add4adbe1b8b7eb8090c51e675c2b8a5f9 /clang/test/SemaCXX/cxx0x-initializer-references.cpp
parentba1b6a16c444690ac2ba9513536a3fc2f1822406 (diff)
downloadbcm5719-llvm-19d08672844ee7558910d9880555b111fc3c90b3.tar.gz
bcm5719-llvm-19d08672844ee7558910d9880555b111fc3c90b3.zip
Implement the remaining portion of DR1467 from r227022. I may have overlooked a few things, but this implementation comes straight from the DR resolution itself.
llvm-svn: 227224
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-references.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-references.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-references.cpp b/clang/test/SemaCXX/cxx0x-initializer-references.cpp
index d1a9ed30076..dda68a3ec94 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-references.cpp
+++ b/clang/test/SemaCXX/cxx0x-initializer-references.cpp
@@ -105,12 +105,13 @@ namespace inner_init {
B b2 { { 0 } };
B b3 { { { 0 } } }; // expected-warning {{braces around scalar init}}
- struct C { C(int); };
+ struct C { C(int); }; // expected-note 2{{candidate constructor (the implicit}} \
+ // expected-note {{candidate constructor not viable: cannot convert initializer list argument to 'int'}}
struct D { C &&r; };
D d1 { 0 }; // ok, 0 implicitly converts to C
D d2 { { 0 } }; // ok, { 0 } calls C(0)
D d3 { { { 0 } } }; // ok, { { 0 } } calls C({ 0 })
- D d4 { { { { 0 } } } }; // expected-warning {{braces around scalar init}}
+ D d4 { { { { 0 } } } }; // expected-error {{no matching constructor for initialization of 'inner_init::C &&'}}
struct E { explicit E(int); }; // expected-note 2{{here}}
struct F { E &&r; };
OpenPOWER on IntegriCloud