diff options
| author | Richard Smith <richard@metafoo.co.uk> | 2020-02-18 16:13:23 -0800 |
|---|---|---|
| committer | Richard Smith <richard@metafoo.co.uk> | 2020-02-19 13:37:59 -0800 |
| commit | 5175565cf154aede57354336102a7f6e15a16a20 (patch) | |
| tree | a5c1b37952d48048d6446fb42bd476f7fb2cfc70 /clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp | |
| parent | 5f76fcc9796e1a68f44a79b7910a199c0db9fe82 (diff) | |
| download | bcm5719-llvm-5175565cf154aede57354336102a7f6e15a16a20.tar.gz bcm5719-llvm-5175565cf154aede57354336102a7f6e15a16a20.zip | |
Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang
user interface and documentation, and update __cplusplus for C++20.
WG21 considers the C++20 standard to be finished (even though it still
has some more steps to pass through in the ISO process).
The old flag names are accepted for compatibility, as usual, and we
still have lots of references to C++2a in comments and identifiers;
those can be cleaned up separately.
(cherry picked from commit 24ad121582454e625bdad125c90d9ac0dae948c8)
Diffstat (limited to 'clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp')
| -rw-r--r-- | clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp b/clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp index 660287c83fc..f37dc8c033c 100644 --- a/clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp +++ b/clang/test/Parser/cxx2a-inline-nested-namespace-definition.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++14 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++2a -Wc++17-compat +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++20 -Wc++17-compat namespace inline foo1::foo2::foo3 { // expected-error {{expected identifier or '{'}} expected-error {{use of undeclared identifier 'foo1'}} } @@ -10,11 +10,11 @@ inline namespace foo4::foo5::foo6 { // expected-error {{nested namespace definit #if __cplusplus <= 201402L // expected-warning@+7 {{nested namespace definition is a C++17 extension; define each namespace separately}} -// expected-warning@+6 {{inline nested namespace definition is a C++2a extension}} +// expected-warning@+6 {{inline nested namespace definition is a C++20 extension}} #elif __cplusplus <= 201703L -// expected-warning@+4 {{inline nested namespace definition is a C++2a extension}} +// expected-warning@+4 {{inline nested namespace definition is a C++20 extension}} #else -// expected-warning@+2 {{inline nested namespace definition is incompatible with C++ standards before C++2a}} +// expected-warning@+2 {{inline nested namespace definition is incompatible with C++ standards before C++20}} #endif namespace valid1::valid2::inline valid3::inline valid4::valid5 {} // expected-note@-1 2 {{previous definition is here}} @@ -27,11 +27,11 @@ namespace valid1::valid2::valid3::valid4::valid5 {} #if __cplusplus <= 201402L // expected-warning@+7 {{nested namespace definition is a C++17 extension; define each namespace separately}} -// expected-warning@+6 {{inline nested namespace definition is a C++2a extension}} +// expected-warning@+6 {{inline nested namespace definition is a C++20 extension}} #elif __cplusplus <= 201703L -// expected-warning@+4 {{inline nested namespace definition is a C++2a extension}} +// expected-warning@+4 {{inline nested namespace definition is a C++20 extension}} #else -// expected-warning@+2 {{inline nested namespace definition is incompatible with C++ standards before C++2a}} +// expected-warning@+2 {{inline nested namespace definition is incompatible with C++ standards before C++20}} #endif namespace valid1::valid2::inline valid3::inline valid4::valid5 {} // expected-note@-1 2 {{previous definition is here}} |

