summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/unknown-std.c2
-rw-r--r--clang/test/Parser/c2x-attributes.c1
-rw-r--r--clang/test/Sema/attr-cx2.c2
-rw-r--r--clang/test/Sema/attr-deprecated-c2x.c2
-rw-r--r--clang/test/Sema/c2x-maybe_unused-errors.c2
-rw-r--r--clang/test/Sema/c2x-maybe_unused.c2
-rw-r--r--clang/test/Sema/c2x-nodiscard.c2
7 files changed, 8 insertions, 5 deletions
diff --git a/clang/test/Driver/unknown-std.c b/clang/test/Driver/unknown-std.c
index 86515506511..d87a968894b 100644
--- a/clang/test/Driver/unknown-std.c
+++ b/clang/test/Driver/unknown-std.c
@@ -16,6 +16,8 @@
// CHECK-NEXT: note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
// CHECK-NEXT: note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard
// CHECK-NEXT: note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard
+// CHECK-NEXT: note: use 'c2x' for 'Working Draft for ISO C2x' standard
+// CHECK-NEXT: note: use 'gnu2x' for 'Working Draft for ISO C2x with GNU extensions' standard
// Make sure that no other output is present.
// CHECK-NOT: {{^.+$}}
diff --git a/clang/test/Parser/c2x-attributes.c b/clang/test/Parser/c2x-attributes.c
index f261dee200a..97f17ad4e7c 100644
--- a/clang/test/Parser/c2x-attributes.c
+++ b/clang/test/Parser/c2x-attributes.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=gnu2x -verify %s
enum [[]] E {
One [[]],
diff --git a/clang/test/Sema/attr-cx2.c b/clang/test/Sema/attr-cx2.c
index 5b537625c12..ec74edf058e 100644
--- a/clang/test/Sema/attr-cx2.c
+++ b/clang/test/Sema/attr-cx2.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fdouble-square-bracket-attributes %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=c2x %s
struct S {};
struct S * [[clang::address_space(1)]] Foo;
diff --git a/clang/test/Sema/attr-deprecated-c2x.c b/clang/test/Sema/attr-deprecated-c2x.c
index 2505f1294c3..744fb1f7c40 100644
--- a/clang/test/Sema/attr-deprecated-c2x.c
+++ b/clang/test/Sema/attr-deprecated-c2x.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only -fdouble-square-bracket-attributes
+// RUN: %clang_cc1 %s -verify -fsyntax-only --std=c2x
int f() [[deprecated]]; // expected-note 2 {{'f' has been explicitly marked deprecated here}}
void g() [[deprecated]];// expected-note {{'g' has been explicitly marked deprecated here}}
diff --git a/clang/test/Sema/c2x-maybe_unused-errors.c b/clang/test/Sema/c2x-maybe_unused-errors.c
index 68150dded9d..39ec2da9a15 100644
--- a/clang/test/Sema/c2x-maybe_unused-errors.c
+++ b/clang/test/Sema/c2x-maybe_unused-errors.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused -std=c2x -verify %s
struct [[maybe_unused]] S1 { // ok
int a [[maybe_unused]];
diff --git a/clang/test/Sema/c2x-maybe_unused.c b/clang/test/Sema/c2x-maybe_unused.c
index 816cf7835fa..82b9634fc9f 100644
--- a/clang/test/Sema/c2x-maybe_unused.c
+++ b/clang/test/Sema/c2x-maybe_unused.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused -std=c2x -verify %s
struct [[maybe_unused]] S1 { // ok
int a [[maybe_unused]];
diff --git a/clang/test/Sema/c2x-nodiscard.c b/clang/test/Sema/c2x-nodiscard.c
index fc5b12347e6..5eaeda40d9b 100644
--- a/clang/test/Sema/c2x-nodiscard.c
+++ b/clang/test/Sema/c2x-nodiscard.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c2x -verify %s
struct [[nodiscard]] S1 { // ok
int i;
OpenPOWER on IntegriCloud