summaryrefslogtreecommitdiffstats
path: root/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema')
-rw-r--r--test/Sema/align-arm-apcs.c2
-rw-r--r--test/Sema/altivec-init.c2
-rw-r--r--test/Sema/carbon.c2
-rw-r--r--test/Sema/cast.c4
-rw-r--r--test/Sema/exprs.c2
-rw-r--r--test/Sema/switch.c12
-rw-r--r--test/Sema/wchar.c4
7 files changed, 22 insertions, 6 deletions
diff --git a/test/Sema/align-arm-apcs.c b/test/Sema/align-arm-apcs.c
index 924ba90..9689906 100644
--- a/test/Sema/align-arm-apcs.c
+++ b/test/Sema/align-arm-apcs.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple arm-unknown-unknown -target-abi=apcs-gnu -fsyntax-only -verify %s
+// RUN: clang-cc -triple arm-unknown-unknown -target-abi apcs-gnu -fsyntax-only -verify %s
struct s0 { double f0; int f1; };
char chk0[__alignof__(struct s0) == 4 ? 1 : -1];
diff --git a/test/Sema/altivec-init.c b/test/Sema/altivec-init.c
index 6185186..2a33e1e 100644
--- a/test/Sema/altivec-init.c
+++ b/test/Sema/altivec-init.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -faltivec -verify -pedantic -fsyntax-only -fblocks=0
+// RUN: clang-cc %s -faltivec -verify -pedantic -fsyntax-only
typedef int v4 __attribute((vector_size(16)));
typedef short v8 __attribute((vector_size(16)));
diff --git a/test/Sema/carbon.c b/test/Sema/carbon.c
index 5eda438..8292ba8 100644
--- a/test/Sema/carbon.c
+++ b/test/Sema/carbon.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -mcpu=pentium4 %s -print-stats
+// RUN: clang-cc -mcpu pentium4 %s -print-stats
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
diff --git a/test/Sema/cast.c b/test/Sema/cast.c
index ec19626..d2e3e0c 100644
--- a/test/Sema/cast.c
+++ b/test/Sema/cast.c
@@ -12,3 +12,7 @@ void bar() {
a = (char*)b; // expected-error {{cannot be cast to a pointer type}}
}
+long bar1(long *next) {
+ return (long)(*next)++;
+}
+
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 2bcc0f8..299b0a2 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -verify -pedantic -fsyntax-only -fblocks=0
+// RUN: clang-cc %s -verify -pedantic -fsyntax-only
// PR1966
_Complex double test1() {
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index 122947e..3ee3712 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -1,5 +1,4 @@
// RUN: clang-cc -fsyntax-only -verify %s
-
void f (int z) {
while (z) {
default: z--; // expected-error {{statement not in switch}}
@@ -75,3 +74,14 @@ void test6() {
break;
}
}
+
+// PR5606
+int f0(int var) {
+ switch (va) { // expected-error{{use of undeclared identifier 'va'}}
+ case 1:
+ break;
+ case 2:
+ return 1;
+ }
+ return 2;
+}
diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c
index e201c7e..ed6649a 100644
--- a/test/Sema/wchar.c
+++ b/test/Sema/wchar.c
@@ -6,7 +6,9 @@ typedef __WCHAR_TYPE__ wchar_t;
#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
|| defined(_M_X64) || defined(SHORT_WCHAR)
#define WCHAR_T_TYPE unsigned short
-#else
+#elif defined(__sun) || defined(__AuroraUX__)
+ #define WCHAR_T_TYPE long
+#else /* Solaris or AuroraUX. */
#define WCHAR_T_TYPE int
#endif
OpenPOWER on IntegriCloud