diff options
| author | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2014-05-22 19:20:46 +0000 |
|---|---|---|
| committer | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2014-05-22 19:20:46 +0000 |
| commit | 847c660ad5aea36a45eec10247116531f539efcb (patch) | |
| tree | ebd3fe08a47188a94de2b551f347aacddca7596f /clang/test/Sema/array-init.c | |
| parent | 328b52e88a1d7244f8beecf3101f6dc794e1be4f (diff) | |
| download | bcm5719-llvm-847c660ad5aea36a45eec10247116531f539efcb.tar.gz bcm5719-llvm-847c660ad5aea36a45eec10247116531f539efcb.zip | |
Improved location for non-constant initializers diagnostics.
llvm-svn: 209466
Diffstat (limited to 'clang/test/Sema/array-init.c')
| -rw-r--r-- | clang/test/Sema/array-init.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c index ae2c7425662..4cc5e412c2d 100644 --- a/clang/test/Sema/array-init.c +++ b/clang/test/Sema/array-init.c @@ -282,7 +282,12 @@ int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an arra int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int [5]' with array of type 'int [3]'}} int nonconst_value(); -int a7[5] = (int[5]){ 1, 2, 3, 4, nonconst_value() }; // expected-error{{initializer element is not a compile-time constant}} +int a7[5] = (int[5]){ 1, + 2, + 3, + 4, + nonconst_value() // expected-error{{initializer element is not a compile-time constant}} +}; // <rdar://problem/10636946> __attribute__((weak)) const unsigned int test10_bound = 10; |

