diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-12-13 01:43:21 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-12-13 01:43:21 +0000 |
commit | 6febf1265b5a5c3025752193caa9714ed523b12d (patch) | |
tree | 8bfacd3582a25b00ca99af5f51b3609d3ff3a6e0 /test/SemaCXX/array-bound-merge.cpp | |
parent | 93ca0217a2aa3047c10518e991ab8578e90829e7 (diff) |
Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,
and make sure additional uses don't get introduced. <rdar://problem/12858424>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/array-bound-merge.cpp')
-rw-r--r-- | test/SemaCXX/array-bound-merge.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/array-bound-merge.cpp b/test/SemaCXX/array-bound-merge.cpp index 8fb2ec52a9..c6085fb0a9 100644 --- a/test/SemaCXX/array-bound-merge.cpp +++ b/test/SemaCXX/array-bound-merge.cpp @@ -9,3 +9,6 @@ extern int c[1]; int c[] = {1,2}; // expected-error {{excess elements in array initializer}} int d[1][]; // expected-error {{array has incomplete element type 'int []'}} + +extern const int e[2]; // expected-note {{previous definition is here}} +int e[] = { 1 }; // expected-error {{redefinition of 'e' with a different type: 'int []' vs 'const int [2]'}} |