diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-05-16 11:45:48 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-05-16 11:45:48 +0000 |
commit | 0b4af8f7554d8ae782fbd9e92a6d4211e8c95c2a (patch) | |
tree | af7500e64aa19393c7e7475db881534a99a3d138 /clang/test/Sema/array-init.c | |
parent | 18bb9284fffb62977647bffaf0bd5fec17241751 (diff) | |
download | bcm5719-llvm-0b4af8f7554d8ae782fbd9e92a6d4211e8c95c2a.tar.gz bcm5719-llvm-0b4af8f7554d8ae782fbd9e92a6d4211e8c95c2a.zip |
PR3009: Get rid of bogus warning for scalar compound literals.
This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.
llvm-svn: 71939
Diffstat (limited to 'clang/test/Sema/array-init.c')
-rw-r--r-- | clang/test/Sema/array-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c index 4e95a018760..dfaaa87ef5b 100644 --- a/clang/test/Sema/array-init.c +++ b/clang/test/Sema/array-init.c @@ -20,7 +20,7 @@ void func() { int x3[x] = { 1, 2 }; // expected-error{{variable-sized object may not be initialized}} - int x4 = { 1, 2 }; // expected-warning{{braces around scalar initializer}} expected-warning{{excess elements in scalar initializer}} + int x4 = { 1, 2 }; // expected-warning{{excess elements in scalar initializer}} int y[4][3] = { { 1, 3, 5 }, |