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/CXX/expr/expr.prim/expr.prim.lambda/p8.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/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp')
-rw-r--r-- | clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp index 1cc1fd974ca..7c95245da4c 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 %s -verify -Wno-c++1y-extensions +// RUN: %clang_cc1 -std=c++11 %s -verify -Wno-c++14-extensions class X0 { void explicit_capture() { @@ -8,7 +8,7 @@ class X0 { (void)[this, this] () {}; // expected-error {{'this' can appear only once}} (void)[=, foo] () {}; // expected-error {{'&' must precede a capture when}} (void)[=, &foo] () {}; - (void)[=, this] () {}; // expected-warning {{C++2a extension}} + (void)[=, this] () {}; // expected-warning {{C++20 extension}} (void)[&, foo] () {}; (void)[&, &foo] () {}; // expected-error {{'&' cannot precede a capture when}} (void)[&, this] () {}; @@ -23,7 +23,7 @@ struct S2 { void S2::f(int i) { (void)[&, i]{ }; (void)[&, &i]{ }; // expected-error{{'&' cannot precede a capture when the capture default is '&'}} - (void)[=, this]{ }; // expected-warning{{C++2a extension}} + (void)[=, this]{ }; // expected-warning{{C++20 extension}} (void)[=]{ this->g(i); }; (void)[i, i]{ }; // expected-error{{'i' can appear only once in a capture list}} (void)[i(0), i(1)]{ }; // expected-error{{'i' can appear only once in a capture list}} |