Testcase for r174477.
authorChad Rosier <mcrosier@apple.com>
Thu, 7 Feb 2013 18:32:25 +0000 (18:32 +0000)
committerChad Rosier <mcrosier@apple.com>
Thu, 7 Feb 2013 18:32:25 +0000 (18:32 +0000)
llvm-svn: 174640

clang/test/Sema/invalid-cast.cpp [new file with mode: 0644]

diff --git a/clang/test/Sema/invalid-cast.cpp b/clang/test/Sema/invalid-cast.cpp
new file mode 100644 (file)
index 0000000..2183352
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s
+// expected-no-diagnostics
+// <rdar://problem/13153516> - This previously triggered an assertion failure.
+template<class T>
+struct X {
+ T array;
+};
+
+int foo(X<int[1]> x0) {
+ return x0.array[17];
+}