diff options
Diffstat (limited to 'test/SemaCXX/functional-cast.cpp')
-rw-r--r-- | test/SemaCXX/functional-cast.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaCXX/functional-cast.cpp b/test/SemaCXX/functional-cast.cpp index f5ca76c38c065..9db95e80d03ed 100644 --- a/test/SemaCXX/functional-cast.cpp +++ b/test/SemaCXX/functional-cast.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // REQUIRES: LP64 // ------------ not interpreted as C-style cast ------------ @@ -11,7 +11,7 @@ struct InitViaConstructor { InitViaConstructor(int i = 7); }; -struct NoValueInit { // expected-note 2 {{candidate constructor (the implicit copy constructor)}} +struct NoValueInit { // expected-note 2 {{candidate constructor (the implicit copy constructor)}} expected-note 2 {{candidate constructor (the implicit move constructor)}} NoValueInit(int i, int j); // expected-note 2 {{candidate constructor}} }; @@ -25,6 +25,7 @@ void test_cxx_function_cast_multi() { (void)NoValueInit(0, 0); (void)NoValueInit(0, 0, 0); // expected-error{{no matching constructor for initialization}} (void)int(1, 2); // expected-error{{excess elements in scalar initializer}} + (void)int({}, 2); // expected-error{{excess elements in scalar initializer}} } |