summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/array-bound-merge.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-12-13 01:43:21 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-12-13 01:43:21 +0000
commit07bab73c7f0a8dc8477c69d8b744b98610dd9304 (patch)
tree4bdf0b814e01f27424462ac0950645d14d141d84 /clang/test/SemaCXX/array-bound-merge.cpp
parent6262bbf819a0bc04871835011d71eb48dc7f0784 (diff)
downloadbcm5719-llvm-07bab73c7f0a8dc8477c69d8b744b98610dd9304.tar.gz
bcm5719-llvm-07bab73c7f0a8dc8477c69d8b744b98610dd9304.zip
Using CanQualType::getAs<ArrayType> is unsafe; fix the code currently using it,
and make sure additional uses don't get introduced. <rdar://problem/12858424>. llvm-svn: 170081
Diffstat (limited to 'clang/test/SemaCXX/array-bound-merge.cpp')
-rw-r--r--clang/test/SemaCXX/array-bound-merge.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/array-bound-merge.cpp b/clang/test/SemaCXX/array-bound-merge.cpp
index 8fb2ec52a9e..c6085fb0a96 100644
--- a/clang/test/SemaCXX/array-bound-merge.cpp
+++ b/clang/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]'}}
OpenPOWER on IntegriCloud