diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-08-14 17:27:59 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-08-14 17:27:59 +0000 |
commit | b52dc49165b05501903ea7355e646467da025c3a (patch) | |
tree | 69532f7472fe1c5ed531c46afdb60e63b3d1a803 /test | |
parent | 63c6fd256d0bccded905f0b05158939291d3f151 (diff) |
Merging r310804:
------------------------------------------------------------------------
r310804 | rsmith | 2017-08-13 15:26:53 -0700 (Sun, 13 Aug 2017) | 2 lines
Replace remaining user-visible mentions of C++1z with C++17.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@310862 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp | 10 | ||||
-rw-r--r-- | test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp | 10 | ||||
-rw-r--r-- | test/CXX/drs/dr0xx.cpp | 20 | ||||
-rw-r--r-- | test/CXX/drs/dr13xx.cpp | 18 | ||||
-rw-r--r-- | test/CXX/drs/dr1xx.cpp | 4 | ||||
-rw-r--r-- | test/CXX/drs/dr2xx.cpp | 8 | ||||
-rw-r--r-- | test/CXX/drs/dr4xx.cpp | 8 | ||||
-rw-r--r-- | test/CXX/drs/dr5xx.cpp | 4 | ||||
-rw-r--r-- | test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp | 4 | ||||
-rw-r--r-- | test/FixIt/fixit.cpp | 2 | ||||
-rw-r--r-- | test/Lexer/hexfloat.cpp | 10 | ||||
-rw-r--r-- | test/Parser/cxx0x-attributes.cpp | 8 | ||||
-rw-r--r-- | test/Parser/cxx1z-constexpr-lambdas.cpp | 8 | ||||
-rw-r--r-- | test/Parser/cxx1z-nested-namespace-definition.cpp | 6 | ||||
-rw-r--r-- | test/SemaCXX/cxx0x-compat.cpp | 8 | ||||
-rw-r--r-- | test/SemaCXX/deprecated.cpp | 16 | ||||
-rw-r--r-- | test/SemaCXX/inline.cpp | 6 | ||||
-rw-r--r-- | test/SemaCXX/static-assert.cpp | 2 | ||||
-rw-r--r-- | test/SemaCXX/warn-c++1z-extensions.cpp | 4 | ||||
-rw-r--r-- | test/SemaTemplate/temp_arg_nontype_cxx11.cpp | 2 |
20 files changed, 79 insertions, 79 deletions
diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp index 3d4b925188..072f5e74aa 100644 --- a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp +++ b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -std=c++1z -verify -Wc++1z-extensions %s -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++1z-extensions %s +// RUN: %clang_cc1 -fsyntax-only -std=c++17 -verify -Wc++17-extensions %s +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -DEXT -Wc++17-extensions %s struct [[nodiscard]] S {}; S get_s(); @@ -23,7 +23,7 @@ void f() { } #ifdef EXT -// expected-warning@4 {{use of the 'nodiscard' attribute is a C++1z extension}} -// expected-warning@8 {{use of the 'nodiscard' attribute is a C++1z extension}} -// expected-warning@11 {{use of the 'nodiscard' attribute is a C++1z extension}} +// expected-warning@4 {{use of the 'nodiscard' attribute is a C++17 extension}} +// expected-warning@8 {{use of the 'nodiscard' attribute is a C++17 extension}} +// expected-warning@11 {{use of the 'nodiscard' attribute is a C++17 extension}} #endif diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp index a627d8331a..551df38a81 100644 --- a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp +++ b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p3.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++1z -Wc++1z-extensions -verify %s -// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++1z-extensions -verify -DEXT %s +// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++17 -Wc++17-extensions -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wunused -Wused-but-marked-unused -std=c++11 -Wc++17-extensions -verify -DEXT %s static_assert(__has_cpp_attribute(maybe_unused) == 201603, ""); @@ -20,7 +20,7 @@ void f() { } #ifdef EXT -// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++1z extension}} -// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++1z extension}} -// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++1z extension}} +// expected-warning@6 {{use of the 'maybe_unused' attribute is a C++17 extension}} +// expected-warning@13 {{use of the 'maybe_unused' attribute is a C++17 extension}} +// expected-warning@14 {{use of the 'maybe_unused' attribute is a C++17 extension}} #endif diff --git a/test/CXX/drs/dr0xx.cpp b/test/CXX/drs/dr0xx.cpp index 055f40f98f..fbca6635ec 100644 --- a/test/CXX/drs/dr0xx.cpp +++ b/test/CXX/drs/dr0xx.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -Wno-bind-to-temporary-copy // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple -// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple +// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -triple %itanium_abi_triple namespace dr1 { // dr1: no namespace X { extern "C" void dr1_f(int a = 1); } @@ -276,9 +276,9 @@ namespace dr23 { // dr23: yes namespace dr25 { // dr25: yes struct A { - void f() throw(int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void f() throw(int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} }; - void (A::*f)() throw (int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void (A::*f)() throw (int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} void (A::*g)() throw () = f; #if __cplusplus <= 201402L // expected-error@-2 {{is not superset of source}} @@ -286,7 +286,7 @@ namespace dr25 { // dr25: yes // expected-error@-4 {{different exception specifications}} #endif void (A::*g2)() throw () = 0; - void (A::*h)() throw (int, char) = f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void (A::*h)() throw (int, char) = f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} void (A::*i)() throw () = &A::f; #if __cplusplus <= 201402L // expected-error@-2 {{is not superset of source}} @@ -294,7 +294,7 @@ namespace dr25 { // dr25: yes // expected-error@-4 {{different exception specifications}} #endif void (A::*i2)() throw () = 0; - void (A::*j)() throw (int, char) = &A::f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void (A::*j)() throw (int, char) = &A::f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} void x() { g2 = f; #if __cplusplus <= 201402L @@ -941,7 +941,7 @@ namespace dr84 { // dr84: yes }; A a; // Cannot use B(C) / operator C() pair to construct the B from the B temporary - // here. In C++1z, we initialize the B object directly using 'A::operator B()'. + // here. In C++17, we initialize the B object directly using 'A::operator B()'. B b = a; #if __cplusplus <= 201402L // expected-error@-2 {{no viable}} @@ -1033,14 +1033,14 @@ namespace dr91 { // dr91: yes } namespace dr92 { // dr92: 4 c++17 - void f() throw(int, float); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} - void (*p)() throw(int) = &f; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void f() throw(int, float); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} + void (*p)() throw(int) = &f; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} #if __cplusplus <= 201402L // expected-error@-2 {{target exception specification is not superset of source}} #else // expected-warning@-4 {{target exception specification is not superset of source}} #endif - void (*q)() throw(int); // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + void (*q)() throw(int); // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} void (**pp)() throw() = &q; #if __cplusplus <= 201402L // expected-error@-2 {{exception specifications are not allowed}} @@ -1064,7 +1064,7 @@ namespace dr92 { // dr92: 4 c++17 // expected-error@-2 {{not implicitly convertible}} #endif - template<void() throw(int)> struct Y {}; // expected-error 0-1{{ISO C++1z does not allow}} expected-note 0-1{{use 'noexcept}} + template<void() throw(int)> struct Y {}; // expected-error 0-1{{ISO C++17 does not allow}} expected-note 0-1{{use 'noexcept}} Y<&h> yp; // ok } diff --git a/test/CXX/drs/dr13xx.cpp b/test/CXX/drs/dr13xx.cpp index 64ba3be2a6..f193c8e024 100644 --- a/test/CXX/drs/dr13xx.cpp +++ b/test/CXX/drs/dr13xx.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors __extension__ typedef __SIZE_TYPE__ size_t; @@ -124,7 +124,7 @@ namespace dr1315 { // dr1315: partial namespace dr1330 { // dr1330: 4 c++11 // exception-specifications are parsed in a context where the class is complete. struct A { - void f() throw(T) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} + void f() throw(T) {} // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}} struct T {}; #if __cplusplus >= 201103L @@ -134,7 +134,7 @@ namespace dr1330 { // dr1330: 4 c++11 #endif }; - void (A::*af1)() throw(A::T) = &A::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} + void (A::*af1)() throw(A::T) = &A::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}} void (A::*af2)() throw() = &A::f; // expected-error-re {{{{not superset|different exception spec}}}} #if __cplusplus >= 201103L @@ -144,7 +144,7 @@ namespace dr1330 { // dr1330: 4 c++11 // Likewise, they're instantiated separately from an enclosing class template. template<typename U> struct B { - void f() throw(T, typename U::type) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} + void f() throw(T, typename U::type) {} // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}} struct T {}; #if __cplusplus >= 201103L @@ -161,7 +161,7 @@ namespace dr1330 { // dr1330: 4 c++11 static const int value = true; }; - void (B<P>::*bpf1)() throw(B<P>::T, int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} + void (B<P>::*bpf1)() throw(B<P>::T, int) = &B<P>::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}} #if __cplusplus < 201103L // expected-error@-2 {{not superset}} // FIXME: We only delay instantiation in C++11 onwards. In C++98, something @@ -172,7 +172,7 @@ namespace dr1330 { // dr1330: 4 c++11 // the "T has not yet been instantiated" error here, rather than giving // confusing errors later on. #endif - void (B<P>::*bpf2)() throw(int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} + void (B<P>::*bpf2)() throw(int) = &B<P>::f; // expected-error 0-1{{C++17}} expected-note 0-1{{noexcept}} #if __cplusplus <= 201402L // expected-error@-2 {{not superset}} #else @@ -194,7 +194,7 @@ namespace dr1330 { // dr1330: 4 c++11 template<typename T> int f() throw(typename T::error) { return 0; } // expected-error 1-4{{prior to '::'}} expected-note 0-1{{prior to '::'}} expected-note 0-1{{requested here}} #if __cplusplus > 201402L - // expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}} + // expected-error@-2 0-1{{C++17}} expected-note@-2 0-1{{noexcept}} #endif // An exception-specification is needed even if the function is only used in // an unevaluated operand. @@ -203,7 +203,7 @@ namespace dr1330 { // dr1330: 4 c++11 decltype(f<char>()) f2; // expected-note {{instantiation of}} bool f3 = noexcept(f<float>()); // expected-note {{instantiation of}} #endif - // In C++1z onwards, substituting explicit template arguments into the + // In C++17 onwards, substituting explicit template arguments into the // function type substitutes into the exception specification (because it's // part of the type). In earlier languages, we don't notice there's a problem // until we've already started to instantiate. @@ -217,7 +217,7 @@ namespace dr1330 { // dr1330: 4 c++11 template<typename T> struct C { C() throw(typename T::type); // expected-error 1-2{{prior to '::'}} #if __cplusplus > 201402L - // expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}} + // expected-error@-2 0-1{{C++17}} expected-note@-2 0-1{{noexcept}} #endif }; struct D : C<void> {}; // ok diff --git a/test/CXX/drs/dr1xx.cpp b/test/CXX/drs/dr1xx.cpp index f5395cfe18..d62ed9f0d3 100644 --- a/test/CXX/drs/dr1xx.cpp +++ b/test/CXX/drs/dr1xx.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1z -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors namespace dr100 { // dr100: yes template<const char *> struct A {}; // expected-note 0-1{{declared here}} @@ -313,7 +313,7 @@ namespace dr126 { // dr126: no virtual void z() throw(long); // expected-error {{more lax}} }; #else - void f() throw(int); // expected-error {{ISO C++1z does not allow}} expected-note {{use 'noexcept}} + void f() throw(int); // expected-error {{ISO C++17 does not allow}} expected-note {{use 'noexcept}} #endif } diff --git a/test/CXX/drs/dr2xx.cpp b/test/CXX/drs/dr2xx.cpp index a5677a125a..4e745ef2f4 100644 --- a/test/CXX/drs/dr2xx.cpp +++ b/test/CXX/drs/dr2xx.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // PR13819 -- __SIZE_TYPE__ is incompatible. typedef __SIZE_TYPE__ size_t; // expected-error 0-1 {{extension}} @@ -984,7 +984,7 @@ namespace dr289 { // dr289: yes namespace dr294 { // dr294: no void f() throw(int); #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif int main() { (void)static_cast<void (*)() throw()>(f); // FIXME: ill-formed in C++14 and before @@ -1001,13 +1001,13 @@ namespace dr294 { // dr294: no #endif (void)static_cast<void (*)() throw(int)>(f); // FIXME: ill-formed in C++14 and before #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif void (*p)() throw() = f; // expected-error-re {{{{not superset|different exception specification}}}} void (*q)() throw(int) = f; #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif } } diff --git a/test/CXX/drs/dr4xx.cpp b/test/CXX/drs/dr4xx.cpp index a30b82f24a..1a5976eada 100644 --- a/test/CXX/drs/dr4xx.cpp +++ b/test/CXX/drs/dr4xx.cpp @@ -1,7 +1,7 @@ // RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // FIXME: __SIZE_TYPE__ expands to 'long long' on some targets. __extension__ typedef __SIZE_TYPE__ size_t; @@ -507,16 +507,16 @@ namespace dr437 { // dr437: sup 1308 struct S { void f() throw(S); #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif void g() throw(T<S>); #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif struct U; void h() throw(U); #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif struct U {}; }; diff --git a/test/CXX/drs/dr5xx.cpp b/test/CXX/drs/dr5xx.cpp index 97b40b8b7c..5122398b7c 100644 --- a/test/CXX/drs/dr5xx.cpp +++ b/test/CXX/drs/dr5xx.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +// RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // FIXME: This is included to avoid a diagnostic with no source location // pointing at the implicit operator new. We can't match such a diagnostic @@ -966,7 +966,7 @@ namespace dr595 { // dr595: dup 1330 template<class T> struct X { void f() throw(T) {} #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow}} expected-note@-2 {{use 'noexcept}} + // expected-error@-2 {{ISO C++17 does not allow}} expected-note@-2 {{use 'noexcept}} #endif }; struct S { diff --git a/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp b/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp index 8c4f36c0ff..ad60868358 100644 --- a/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp +++ b/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify %s -// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s struct pr12960 { int begin; @@ -125,7 +125,7 @@ void g() { }; for (auto a : Differ()) #if __cplusplus <= 201402L - // expected-warning@-2 {{'begin' and 'end' returning different types ('int *' and 'null_t') is a C++1z extension}} + // expected-warning@-2 {{'begin' and 'end' returning different types ('int *' and 'null_t') is a C++17 extension}} // expected-note@-6 {{selected 'begin' function with iterator type 'int *'}} // expected-note@-6 {{selected 'end' function with iterator type 'null_t'}} #endif diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp index 0b7fc626ff..92c561a20a 100644 --- a/test/FixIt/fixit.cpp +++ b/test/FixIt/fixit.cpp @@ -216,7 +216,7 @@ template<class T> typedef Mystery<T>::type getMysteriousThing() { // \ } template<template<typename> Foo, // expected-error {{template template parameter requires 'class' after the parameter list}} - template<typename> typename Bar, // expected-warning {{template template parameter using 'typename' is a C++1z extension}} + template<typename> typename Bar, // expected-warning {{template template parameter using 'typename' is a C++17 extension}} template<typename> struct Baz> // expected-error {{template template parameter requires 'class' after the parameter list}} void func(); diff --git a/test/Lexer/hexfloat.cpp b/test/Lexer/hexfloat.cpp index 163db72f56..3241751a12 100644 --- a/test/Lexer/hexfloat.cpp +++ b/test/Lexer/hexfloat.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify -pedantic %s // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -pedantic %s // RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify -pedantic %s -// RUN: %clang_cc1 -std=c++1z -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify -pedantic %s double e = 0x.p0; // expected-error-re {{hexadecimal floating {{constant|literal}} requires a significand}} float f = 0x1p+1; @@ -9,10 +9,10 @@ double d = 0x.2p2; float g = 0x1.2p2; double h = 0x1.p2; #if __cplusplus <= 201402L -// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}} -// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}} -// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}} -// expected-warning@-5 {{hexadecimal floating literals are a C++1z feature}} +// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}} +// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}} +// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}} +// expected-warning@-5 {{hexadecimal floating literals are a C++17 feature}} #endif // PR12717: In order to minimally diverge from the C++ standard, we do not lex diff --git a/test/Parser/cxx0x-attributes.cpp b/test/Parser/cxx0x-attributes.cpp index 647762f165..5db06bd3f2 100644 --- a/test/Parser/cxx0x-attributes.cpp +++ b/test/Parser/cxx0x-attributes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++1z-extensions %s +// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++17-extensions %s // Need std::initializer_list namespace std { @@ -127,7 +127,7 @@ extern "C++" [[]] { } // expected-error {{an attribute list cannot appear here}} [[]] using ns::i; // expected-error {{an attribute list cannot appear here}} [[unknown]] using namespace ns; // expected-warning {{unknown attribute 'unknown' ignored}} [[noreturn]] using namespace ns; // expected-error {{'noreturn' attribute only applies to functions}} -namespace [[]] ns2 {} // expected-warning {{attributes on a namespace declaration are incompatible with C++ standards before C++1z}} +namespace [[]] ns2 {} // expected-warning {{attributes on a namespace declaration are incompatible with C++ standards before C++17}} using [[]] alignas(4) [[]] ns::i; // expected-error {{an attribute list cannot appear here}} using [[]] alignas(4) [[]] foobar = int; // expected-error {{an attribute list cannot appear here}} expected-error {{'alignas' attribute only applies to}} @@ -179,7 +179,7 @@ enum [[]] E2; // expected-error {{forbids forward references}} enum [[]] E1; enum [[]] E3 : int; enum [[]] { - k_123 [[]] = 123 // expected-warning {{attributes on an enumerator declaration are incompatible with C++ standards before C++1z}} + k_123 [[]] = 123 // expected-warning {{attributes on an enumerator declaration are incompatible with C++ standards before C++17}} }; enum [[]] E1 e; // expected-error {{an attribute list cannot appear here}} enum [[]] class E4 { }; // expected-error {{an attribute list cannot appear here}} @@ -352,7 +352,7 @@ int fallthru(int n) { switch (n) { case 0: n += 5; - [[fallthrough]]; // expected-warning {{use of the 'fallthrough' attribute is a C++1z extension}} + [[fallthrough]]; // expected-warning {{use of the 'fallthrough' attribute is a C++17 extension}} case 1: n *= 2; break; diff --git a/test/Parser/cxx1z-constexpr-lambdas.cpp b/test/Parser/cxx1z-constexpr-lambdas.cpp index ea000e361c..4cf3d12211 100644 --- a/test/Parser/cxx1z-constexpr-lambdas.cpp +++ b/test/Parser/cxx1z-constexpr-lambdas.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++1z %s -verify +// RUN: %clang_cc1 -std=c++17 %s -verify // RUN: %clang_cc1 -std=c++14 %s -verify // RUN: %clang_cc1 -std=c++11 %s -verify @@ -23,9 +23,9 @@ auto XL16 = [] () constexpr { }; #else -auto L = []() mutable constexpr {return 0; }; //expected-warning{{is a C++1z extension}} -auto L2 = []() constexpr { return 0;};//expected-warning{{is a C++1z extension}} -auto L4 = []() constexpr mutable { return 0; }; //expected-warning{{is a C++1z extension}} +auto L = []() mutable constexpr {return 0; }; //expected-warning{{is a C++17 extension}} +auto L2 = []() constexpr { return 0;};//expected-warning{{is a C++17 extension}} +auto L4 = []() constexpr mutable { return 0; }; //expected-warning{{is a C++17 extension}} #endif diff --git a/test/Parser/cxx1z-nested-namespace-definition.cpp b/test/Parser/cxx1z-nested-namespace-definition.cpp index 96f34c540a..e5e809aa03 100644 --- a/test/Parser/cxx1z-nested-namespace-definition.cpp +++ b/test/Parser/cxx1z-nested-namespace-definition.cpp @@ -2,13 +2,13 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: not %clang_cc1 -x c++ -fixit %t -Werror -DFIXIT // RUN: %clang_cc1 -x c++ %t -DFIXIT -// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1z -Wc++14-compat +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -Wc++14-compat namespace foo1::foo2::foo3 { #if __cplusplus <= 201400L -// expected-warning@-2 {{nested namespace definition is a C++1z extension; define each namespace separately}} +// expected-warning@-2 {{nested namespace definition is a C++17 extension; define each namespace separately}} #else -// expected-warning@-4 {{nested namespace definition is incompatible with C++ standards before C++1z}} +// expected-warning@-4 {{nested namespace definition is incompatible with C++ standards before C++17}} #endif int foo(int x) { return x; } } diff --git a/test/SemaCXX/cxx0x-compat.cpp b/test/SemaCXX/cxx0x-compat.cpp index bcf0cf11dc..8f7aaab6a4 100644 --- a/test/SemaCXX/cxx0x-compat.cpp +++ b/test/SemaCXX/cxx0x-compat.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat -verify %s -// RUN: %clang_cc1 -fsyntax-only -std=c++1z -Wc++11-compat -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++17 -Wc++11-compat -verify %s #if __cplusplus < 201103L @@ -42,14 +42,14 @@ void h(size_t foo, size_t bar) { char c = 'x'_x; // expected-warning {{will be treated as a user-defined literal suffix}} template<int ...N> int f() { // expected-warning {{C++11 extension}} - return (N + ...); // expected-warning {{C++1z extension}} + return (N + ...); // expected-warning {{C++17 extension}} } #else auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++14}} -static_assert(true); // expected-warning {{incompatible with C++ standards before C++1z}} +static_assert(true); // expected-warning {{incompatible with C++ standards before C++17}} -template<int ...N> int f() { return (N + ...); } // expected-warning {{incompatible with C++ standards before C++1z}} +template<int ...N> int f() { return (N + ...); } // expected-warning {{incompatible with C++ standards before C++17}} #endif diff --git a/test/SemaCXX/deprecated.cpp b/test/SemaCXX/deprecated.cpp index ac477d4b66..26f30c91b0 100644 --- a/test/SemaCXX/deprecated.cpp +++ b/test/SemaCXX/deprecated.cpp @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -std=c++98 %s -Wdeprecated -verify -triple x86_64-linux-gnu // RUN: %clang_cc1 -std=c++11 %s -Wdeprecated -verify -triple x86_64-linux-gnu -// RUN: %clang_cc1 -std=c++1y %s -Wdeprecated -verify -triple x86_64-linux-gnu -// RUN: %clang_cc1 -std=c++1z %s -Wdeprecated -verify -triple x86_64-linux-gnu +// RUN: %clang_cc1 -std=c++14 %s -Wdeprecated -verify -triple x86_64-linux-gnu +// RUN: %clang_cc1 -std=c++17 %s -Wdeprecated -verify -triple x86_64-linux-gnu -// RUN: %clang_cc1 -std=c++1y %s -Wdeprecated -verify -triple x86_64-linux-gnu -Wno-deprecated-register -DNO_DEPRECATED_FLAGS +// RUN: %clang_cc1 -std=c++14 %s -Wdeprecated -verify -triple x86_64-linux-gnu -Wno-deprecated-register -DNO_DEPRECATED_FLAGS #include "Inputs/register.h" @@ -12,8 +12,8 @@ void h() throw(int); void i() throw(...); #if __cplusplus > 201402L // expected-warning@-4 {{dynamic exception specifications are deprecated}} expected-note@-4 {{use 'noexcept' instead}} -// expected-error@-4 {{ISO C++1z does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}} -// expected-error@-4 {{ISO C++1z does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}} +// expected-error@-4 {{ISO C++17 does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}} +// expected-error@-4 {{ISO C++17 does not allow dynamic exception specifications}} expected-note@-4 {{use 'noexcept(false)' instead}} #elif __cplusplus >= 201103L // expected-warning@-8 {{dynamic exception specifications are deprecated}} expected-note@-8 {{use 'noexcept' instead}} // expected-warning@-8 {{dynamic exception specifications are deprecated}} expected-note@-8 {{use 'noexcept(false)' instead}} @@ -23,7 +23,7 @@ void i() throw(...); void stuff() { register int n; #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow 'register' storage class specifier}} + // expected-error@-2 {{ISO C++17 does not allow 'register' storage class specifier}} #elif __cplusplus >= 201103L && !defined(NO_DEPRECATED_FLAGS) // expected-warning@-4 {{'register' storage class specifier is deprecated}} #endif @@ -34,14 +34,14 @@ void stuff() { bool b; ++b; #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow incrementing expression of type bool}} + // expected-error@-2 {{ISO C++17 does not allow incrementing expression of type bool}} #else // expected-warning@-4 {{incrementing expression of type bool is deprecated}} #endif b++; #if __cplusplus > 201402L - // expected-error@-2 {{ISO C++1z does not allow incrementing expression of type bool}} + // expected-error@-2 {{ISO C++17 does not allow incrementing expression of type bool}} #else // expected-warning@-4 {{incrementing expression of type bool is deprecated}} #endif diff --git a/test/SemaCXX/inline.cpp b/test/SemaCXX/inline.cpp index b20bc18d0a..ba29521ce5 100644 --- a/test/SemaCXX/inline.cpp +++ b/test/SemaCXX/inline.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s -Wc++98-c++11-c++14-compat +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s -Wc++98-c++11-c++14-compat // Check that we don't allow illegal uses of inline // (checking C++-only constructs here) @@ -12,7 +12,7 @@ void localVar() { // Check that we warn appropriately. #if __cplusplus <= 201402L -inline int a; // expected-warning{{inline variables are a C++1z extension}} +inline int a; // expected-warning{{inline variables are a C++17 extension}} #else -inline int a; // expected-warning{{inline variables are incompatible with C++ standards before C++1z}} +inline int a; // expected-warning{{inline variables are incompatible with C++ standards before C++17}} #endif diff --git a/test/SemaCXX/static-assert.cpp b/test/SemaCXX/static-assert.cpp index 7de4d07b50..196375c3d6 100644 --- a/test/SemaCXX/static-assert.cpp +++ b/test/SemaCXX/static-assert.cpp @@ -49,5 +49,5 @@ struct X { ~X(); }; StaticAssertProtected<int> sap1; StaticAssertProtected<X> sap2; // expected-note {{instantiation}} -static_assert(true); // expected-warning {{C++1z extension}} +static_assert(true); // expected-warning {{C++17 extension}} static_assert(false); // expected-error-re {{failed{{$}}}} expected-warning {{extension}} diff --git a/test/SemaCXX/warn-c++1z-extensions.cpp b/test/SemaCXX/warn-c++1z-extensions.cpp index 9b5e1c205c..a0d44a34ff 100644 --- a/test/SemaCXX/warn-c++1z-extensions.cpp +++ b/test/SemaCXX/warn-c++1z-extensions.cpp @@ -1,8 +1,8 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s void f() { - if (bool b = true; b) {} // expected-warning {{'if' initialization statements are a C++1z extension}} - switch (int n = 5; n) { // expected-warning {{'switch' initialization statements are a C++1z extension}} + if (bool b = true; b) {} // expected-warning {{'if' initialization statements are a C++17 extension}} + switch (int n = 5; n) { // expected-warning {{'switch' initialization statements are a C++17 extension}} case 5: break; } } diff --git a/test/SemaTemplate/temp_arg_nontype_cxx11.cpp b/test/SemaTemplate/temp_arg_nontype_cxx11.cpp index cfaad0cd0c..0b8f0eed16 100644 --- a/test/SemaTemplate/temp_arg_nontype_cxx11.cpp +++ b/test/SemaTemplate/temp_arg_nontype_cxx11.cpp @@ -25,7 +25,7 @@ namespace CanonicalNullptr { } namespace Auto { - template<auto> struct A { }; // expected-error {{until C++1z}} + template<auto> struct A { }; // expected-error {{until C++17}} } namespace check_conversion_early { |