aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/array-bound-merge.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-10 08:54:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-10 08:54:47 +0000
commit153c33ed957b135a366178c61bbe22b6b1362a2a (patch)
tree06e5d9644fc32a5723fea989dcb8210dc645261b /test/SemaCXX/array-bound-merge.cpp
parent2ce79bc4fd6818abfcdaffcad136994905e62fea (diff)
Fix for PR5515: allow "merging" array bounds both forwards and backwards.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/array-bound-merge.cpp')
-rw-r--r--test/SemaCXX/array-bound-merge.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/array-bound-merge.cpp b/test/SemaCXX/array-bound-merge.cpp
new file mode 100644
index 0000000000..579c793368
--- /dev/null
+++ b/test/SemaCXX/array-bound-merge.cpp
@@ -0,0 +1,9 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// PR5515
+
+extern int a[];
+int a[10];
+extern int b[10];
+int b[];
+extern int c[1];
+int c[] = {1,2}; // expected-error {{excess elements in array initializer}}