diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/Sema/i-c-e.c | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/Sema/i-c-e.c')
-rw-r--r-- | test/Sema/i-c-e.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Sema/i-c-e.c b/test/Sema/i-c-e.c index eb77bbe..4c2962d 100644 --- a/test/Sema/i-c-e.c +++ b/test/Sema/i-c-e.c @@ -1,4 +1,4 @@ -// RUN: %clang %s -fsyntax-only -Xclang -verify -pedantic -fpascal-strings +// RUN: %clang %s -ffreestanding -fsyntax-only -Xclang -verify -pedantic -fpascal-strings #include <stdint.h> #include <limits.h> @@ -9,6 +9,7 @@ int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;} // expected-error {{inc int expr; char w[__builtin_constant_p(expr) ? expr : 1]; +char v[sizeof(__builtin_constant_p(0)) == sizeof(int) ? 1 : -1]; // __builtin_constant_p as the condition of ?: allows arbitrary foldable // constants to be transmogrified into i-c-e's. |