From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/Sema/array-size.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/Sema/array-size.c (limited to 'test/Sema/array-size.c') diff --git a/test/Sema/array-size.c b/test/Sema/array-size.c new file mode 100644 index 0000000..7580e3e --- /dev/null +++ b/test/Sema/array-size.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple i686-apple-darwin -verify %s + +void f() { + int x0[1073741824]; // expected-error{{array is too large}} + int x1[1073741824 + 1]; // expected-error{{array is too large}} + int x2[(unsigned)1073741824]; // expected-error{{array is too large}} + int x3[(unsigned)1073741824 + 1]; // expected-error{{array is too large}} + int x4[1073741824 - 1]; +} + -- cgit v1.1