aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/type-convert-construct.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-08 21:40:08 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-08 21:40:08 +0000
commit19311e70edaa2d7bb0d709344aebea4fbbae2da4 (patch)
treee0698436bd41b66e14c88789f6f809ab1c8700bf /test/SemaCXX/type-convert-construct.cpp
parent56a965c0f77c9e6bffd65cc8f8796442a8527381 (diff)
Use the new-initialization code for initializing scalars with a
function-style cast. Previously, we had a (redundant, incorrect) semantic-checking path for non-class types, which allowed value-initialization of a reference type and then crashed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/type-convert-construct.cpp')
-rw-r--r--test/SemaCXX/type-convert-construct.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaCXX/type-convert-construct.cpp b/test/SemaCXX/type-convert-construct.cpp
index 8f92a035dc..479af21476 100644
--- a/test/SemaCXX/type-convert-construct.cpp
+++ b/test/SemaCXX/type-convert-construct.cpp
@@ -2,7 +2,7 @@
void f() {
float v1 = float(1);
- int v2 = typeof(int)(1,2); // expected-error {{function-style cast to a builtin type can only take one argument}}
+ int v2 = typeof(int)(1,2); // expected-error {{excess elements in scalar initializer}}
typedef int arr[];
int v3 = arr(); // expected-error {{array types cannot be value-initialized}}
int v4 = int();