diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-04 22:46:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-04 22:46:25 +0000 |
commit | fc4f8a183444747b3abea2e5a1dcca83b116dcd3 (patch) | |
tree | ea2ede6d592437d1e8ed5ebd195db837b9ec2bb0 /clang/test/SemaCXX/dcl_init_aggr.cpp | |
parent | 82f071faa7340828da5729736e1d2b3180f3b63e (diff) | |
download | bcm5719-llvm-fc4f8a183444747b3abea2e5a1dcca83b116dcd3.tar.gz bcm5719-llvm-fc4f8a183444747b3abea2e5a1dcca83b116dcd3.zip |
Implement semantic analysis for the GNU flexible array initialization
extension. The interaction with designated initializers is a
bit... interesting... but we follow GNU's lead and don't permit too
much crazy code in this area.
Also, make the "excess initializers" error message a bit more
informative.
Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561
llvm-svn: 63785
Diffstat (limited to 'clang/test/SemaCXX/dcl_init_aggr.cpp')
-rw-r--r-- | clang/test/SemaCXX/dcl_init_aggr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/dcl_init_aggr.cpp b/clang/test/SemaCXX/dcl_init_aggr.cpp index e5015fab030..fbe7de15639 100644 --- a/clang/test/SemaCXX/dcl_init_aggr.cpp +++ b/clang/test/SemaCXX/dcl_init_aggr.cpp @@ -118,5 +118,5 @@ union u { int a; char* b; }; u u1 = { 1 }; u u2 = u1; u u3 = 1; // expected-error{{cannot initialize 'u3' with an rvalue of type 'int'}} -u u4 = { 0, "asdf" }; // expected-error{{excess elements in array initializer}} +u u4 = { 0, "asdf" }; // expected-error{{excess elements in union initializer}} u u5 = { "asdf" }; // expected-error{{incompatible type initializing 'char const [5]', expected 'int'}} |