aboutsummaryrefslogtreecommitdiff
path: root/test/Sema
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-19 08:11:05 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-19 08:11:05 +0000
commitcfdc81a83467973b14e4ea5e9e9af1690f135415 (patch)
tree4bd3d011b2bad5d5dd69b054903a68d784dbea92 /test/Sema
parent2d48e7811216b2a2d15dcf7e4be8f73ad48cc60a (diff)
Initialization improvements: addition of string initialization and a few
small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r--test/Sema/array-init.c2
-rw-r--r--test/Sema/init.c2
-rw-r--r--test/Sema/wchar.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index fbcf06bd16..45d3183852 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -167,7 +167,7 @@ void charArrays() {
void variableArrayInit() {
int a = 4;
- char strlit[a] = "foo"; //expected-error{{variable-sized object may not be initialized}}
+ char strlit[a] = "foo"; //expected-error{{array initializer must be an initializer list or string literal}}
int b[a] = { 1, 2, 4 }; //expected-error{{variable-sized object may not be initialized}}
}
diff --git a/test/Sema/init.c b/test/Sema/init.c
index 9ebbce9758..c2712480c6 100644
--- a/test/Sema/init.c
+++ b/test/Sema/init.c
@@ -20,7 +20,7 @@ int *h = &x;
int test() {
int a[10];
-int b[10] = a; // expected-error {{initialization with '{...}' expected}}
+int b[10] = a; // expected-error {{array initializer must be an initializer list}}
int +; // expected-error {{expected identifier or '('}}
}
diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c
index edec2b30ce..28ec2f14ce 100644
--- a/test/Sema/wchar.c
+++ b/test/Sema/wchar.c
@@ -17,6 +17,6 @@ int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1];
void foo() {
WCHAR_T_TYPE t1[] = L"x";
wchar_t tab[] = L"x";
- WCHAR_T_TYPE t2[] = "x"; // expected-error {{initialization}}
- char t3[] = L"x"; // expected-error {{initialization}}
+ WCHAR_T_TYPE t2[] = "x"; // expected-error {{initializer}}
+ char t3[] = L"x"; // expected-error {{initializer}}
}