summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-10-20 23:26:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-10-20 23:26:58 +0000
commitab506adf7d3ced6abcaf42f92de3d6cd15fa19e8 (patch)
tree58e29f07d41e8ad46b8e282367d45b8dbf207a37 /clang/test/Sema
parente6b994eb93b6825d396e8ee66e791611ba112d25 (diff)
downloadbcm5719-llvm-ab506adf7d3ced6abcaf42f92de3d6cd15fa19e8.tar.gz
bcm5719-llvm-ab506adf7d3ced6abcaf42f92de3d6cd15fa19e8.zip
Switch C compilations to C11 by default.
This is long-since overdue, and matches GCC 5.0. This should also be backwards-compatible, because we already supported all of C11 as an extension in C99 mode. llvm-svn: 220244
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/anonymous-struct-union-c11.c4
-rw-r--r--clang/test/Sema/array-init.c4
-rw-r--r--clang/test/Sema/attr-deprecated.c4
-rw-r--r--clang/test/Sema/types.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/clang/test/Sema/anonymous-struct-union-c11.c b/clang/test/Sema/anonymous-struct-union-c11.c
index 229ee520575..712e29e5496 100644
--- a/clang/test/Sema/anonymous-struct-union-c11.c
+++ b/clang/test/Sema/anonymous-struct-union-c11.c
@@ -1,8 +1,8 @@
// Check for warnings in non-C11 mode:
-// RUN: %clang_cc1 -fsyntax-only -verify -Wc11-extensions %s
+// RUN: %clang_cc1 -fsyntax-only -std=c99 -verify -Wc11-extensions %s
// Expect no warnings in C11 mode:
-// RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -std=c11 %s
+// RUN: %clang_cc1 -fsyntax-only -std=c11 -pedantic -Werror %s
struct s {
int a;
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index 4cc5e412c2d..7cb48153168 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wgnu -Wc11-extensions -verify %s
+// RUN: %clang_cc1 -std=gnu99 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -std=gnu99 -fsyntax-only -Wgnu -Wc11-extensions -verify %s
// REQUIRES: LP64
extern int foof() = 1; // expected-error{{illegal initializer (only variables can be initialized)}}
diff --git a/clang/test/Sema/attr-deprecated.c b/clang/test/Sema/attr-deprecated.c
index c9e3dd546c5..2e3e722942a 100644
--- a/clang/test/Sema/attr-deprecated.c
+++ b/clang/test/Sema/attr-deprecated.c
@@ -121,6 +121,6 @@ struct test22 {
__attribute((deprecated)) foo_dep e, f;
};
-typedef int test23_ty __attribute((deprecated)); // expected-note {{previous definition is here}}
-typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
+typedef int test23_ty __attribute((deprecated));
+typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}}
test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}
diff --git a/clang/test/Sema/types.c b/clang/test/Sema/types.c
index 6a22b20b0ea..1ed8dae4c80 100644
--- a/clang/test/Sema/types.c
+++ b/clang/test/Sema/types.c
@@ -30,12 +30,12 @@ int c() {
int __int128; // expected-error {{cannot combine with previous}} expected-warning {{does not declare anything}}
}
// __int128_t is __int128; __uint128_t is unsigned __int128.
-typedef __int128 check_int_128; // expected-note {{here}}
-typedef __int128_t check_int_128; // expected-note {{here}} expected-warning {{redefinition}}
+typedef __int128 check_int_128;
+typedef __int128_t check_int_128; // expected-note {{here}}
typedef int check_int_128; // expected-error {{different types ('int' vs '__int128_t' (aka '__int128'))}}
-typedef unsigned __int128 check_uint_128; // expected-note {{here}}
-typedef __uint128_t check_uint_128; // expected-note {{here}} expected-warning {{redefinition}}
+typedef unsigned __int128 check_uint_128;
+typedef __uint128_t check_uint_128; // expected-note {{here}}
typedef int check_uint_128; // expected-error {{different types ('int' vs '__uint128_t' (aka 'unsigned __int128'))}}
// Array type merging should convert array size to whatever matches the target
OpenPOWER on IntegriCloud