diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
commit | 77212133072dc40f070a280af8217032f55a9eb4 (patch) | |
tree | 2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/Sema | |
parent | 4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa (diff) | |
download | FreeBSD-src-77212133072dc40f070a280af8217032f55a9eb4.zip FreeBSD-src-77212133072dc40f070a280af8217032f55a9eb4.tar.gz |
Update clang to 91430.
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/block-as-object.m | 2 | ||||
-rw-r--r-- | test/Sema/builtin-prefetch.c | 3 | ||||
-rw-r--r-- | test/Sema/compare.c | 5 | ||||
-rw-r--r-- | test/Sema/exprs.c | 2 | ||||
-rw-r--r-- | test/Sema/init.c | 4 | ||||
-rw-r--r-- | test/Sema/ms-fuzzy-asm.c | 2 | ||||
-rw-r--r-- | test/Sema/nested-redef.c | 3 | ||||
-rw-r--r-- | test/Sema/rdar6248119.m | 2 | ||||
-rw-r--r-- | test/Sema/return.c | 4 | ||||
-rw-r--r-- | test/Sema/vector-init.c | 11 |
10 files changed, 30 insertions, 8 deletions
diff --git a/test/Sema/block-as-object.m b/test/Sema/block-as-object.m index 219b1a0..1197a19 100644 --- a/test/Sema/block-as-object.m +++ b/test/Sema/block-as-object.m @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -fsyntax-only -verify -fblocks +// RUN: clang -cc1 %s -fsyntax-only -verify -fblocks @interface Whatever - copy; diff --git a/test/Sema/builtin-prefetch.c b/test/Sema/builtin-prefetch.c index bf28277..4ee9f89 100644 --- a/test/Sema/builtin-prefetch.c +++ b/test/Sema/builtin-prefetch.c @@ -6,7 +6,8 @@ void foo() { __builtin_prefetch(&a, 1); __builtin_prefetch(&a, 1, 2); __builtin_prefetch(&a, 1, 9, 3); // expected-error{{too many arguments to function}} - __builtin_prefetch(&a, "hello", 2); // expected-error{{argument to __builtin_prefetch must be a constant integer}} + __builtin_prefetch(&a, "hello", 2); // expected-error{{argument to __builtin_prefetch must be of integer type}} + __builtin_prefetch(&a, a, 2); // expected-error{{argument to __builtin_prefetch must be a constant integer}} __builtin_prefetch(&a, 2); // expected-error{{argument should be a value from 0 to 1}} __builtin_prefetch(&a, 0, 4); // expected-error{{argument should be a value from 0 to 3}} __builtin_prefetch(&a, -1, 4); // expected-error{{argument should be a value from 0 to 1}} diff --git a/test/Sema/compare.c b/test/Sema/compare.c index 01a216f..fa2d3a0 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -225,3 +225,8 @@ int void_pointers(void* foo) { return foo == (void*) 0; return foo == (void*) 1; } + +int test1(int i) { + enum en { zero }; + return i > zero; +} diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index 299b0a2..10fcde6 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -111,4 +111,6 @@ test15_t test15(void) { return (test15_t)0 + (test15_t)0; // expected-error {{invalid operands to binary expression ('test15_t' (aka 'unsigned long *') and 'test15_t')}} } +// rdar://7446395 +void test16(float x) { x == ((void*) 0); } // expected-error {{invalid operands to binary expression}} diff --git a/test/Sema/init.c b/test/Sema/init.c index 840b24f..4ba6867 100644 --- a/test/Sema/init.c +++ b/test/Sema/init.c @@ -126,3 +126,7 @@ uintptr_t ptrasintadd3 = 4 + (uintptr_t)&a; // PR4285 const wchar_t widestr[] = L"asdf"; + +// PR5447 +const double pr5447 = (0.05 < -1.0) ? -1.0 : 0.0499878; + diff --git a/test/Sema/ms-fuzzy-asm.c b/test/Sema/ms-fuzzy-asm.c index 58dcbcf..2113949 100644 --- a/test/Sema/ms-fuzzy-asm.c +++ b/test/Sema/ms-fuzzy-asm.c @@ -6,4 +6,4 @@ void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } - +void* t4(void) { __asm mov eax, fs:[0x10] } diff --git a/test/Sema/nested-redef.c b/test/Sema/nested-redef.c index ea18091..54a970f 100644 --- a/test/Sema/nested-redef.c +++ b/test/Sema/nested-redef.c @@ -1,6 +1,7 @@ // RUN: clang-cc -fsyntax-only -verify %s struct X { // expected-note{{previous definition is here}} - struct X { } x; // expected-error{{nested redefinition of 'X'}} + struct X { } x; // expected-error{{nested redefinition of 'X'}} \ + // expected-error{{field has incomplete type}} }; struct Y { }; diff --git a/test/Sema/rdar6248119.m b/test/Sema/rdar6248119.m index 631c7b3..d4ee305 100644 --- a/test/Sema/rdar6248119.m +++ b/test/Sema/rdar6248119.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -fsyntax-only %s -verify +// RUN: clang -cc1 -fsyntax-only %s -verify // Test case for: // <rdar://problem/6248119> @finally doesn't introduce a new scope diff --git a/test/Sema/return.c b/test/Sema/return.c index ad75cf1..2e8120a 100644 --- a/test/Sema/return.c +++ b/test/Sema/return.c @@ -222,3 +222,7 @@ void test32() { void test33() { if (j) while (1) { } } + +int test34() { + asm("nop"); +} diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c index 9dac6c7..1eec6c5 100644 --- a/test/Sema/vector-init.c +++ b/test/Sema/vector-init.c @@ -16,10 +16,15 @@ float4 array2[2] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, float4 array3[2] = { {1.0, 2.0, 3.0}, 5.0, 6.0, 7.0, 8.0, 9.0 }; // expected-warning {{excess elements in array initializer}} +// PR5650 +__attribute__((vector_size(16))) float f1(void) { + __attribute__((vector_size(16))) float vec = {0.0f, 0.0f, 0.0f}; + return(vec); +} -// rdar://6881069 -__attribute__((vector_size(16))) // expected-error {{unsupported type 'float (void)' for vector_size attribute, please use on typedef}} -float f1(void) { +__attribute__((vector_size(16))) float f2( + __attribute__((vector_size(16))) float a1) { + return(a1); } |