summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/crash-invalid-array.c
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-08 22:22:26 +0000
committerAlp Toker <alp@nuanti.com>2013-12-08 22:22:26 +0000
commit2e412648691086b17ab0ff1c1b7398d03c01b308 (patch)
tree6e818ffa6d4da4377c4ba0bef259becdef4bf1e0 /clang/test/Sema/crash-invalid-array.c
parent72cc248524da87d20830f6ddaa3c90788bb2ae7e (diff)
downloadbcm5719-llvm-2e412648691086b17ab0ff1c1b7398d03c01b308.tar.gz
bcm5719-llvm-2e412648691086b17ab0ff1c1b7398d03c01b308.zip
Re-enable verification of test and update outdated diag checks
Going by PR6913 it looks like this one can no longer reach CodeGen so remove the redundant -emit-llvm case and treat it as an ordinary Sema test. llvm-svn: 196736
Diffstat (limited to 'clang/test/Sema/crash-invalid-array.c')
-rw-r--r--clang/test/Sema/crash-invalid-array.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Sema/crash-invalid-array.c b/clang/test/Sema/crash-invalid-array.c
index eeac39148ca..dac335174f2 100644
--- a/clang/test/Sema/crash-invalid-array.c
+++ b/clang/test/Sema/crash-invalid-array.c
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 -O1 %s -emit-llvm
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify %s
// PR6913
#include <stdio.h>
@@ -6,13 +6,13 @@
int main()
{
int x[10][10];
- int (*p)[] = x; // expected-error {{invalid use of array with unspecified bounds}
+ int (*p)[] = x;
int i;
for(i = 0; i < 10; ++i)
{
- p[i][i] = i;
+ p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}}
}
}
OpenPOWER on IntegriCloud