diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp | 4 | ||||
-rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp | 28 | ||||
-rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp | 12 | ||||
-rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp | 2 | ||||
-rw-r--r-- | clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp | 12 | ||||
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp | 8 | ||||
-rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp | 2 | ||||
-rw-r--r-- | clang/test/FixIt/fixit-cxx1y-compat.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx11.cpp | 24 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx0x-compat.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx98-compat-pedantic.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx98-compat.cpp | 32 | ||||
-rw-r--r-- | clang/test/SemaCXX/trailing-return-0x.cpp | 10 | ||||
-rw-r--r-- | clang/test/SemaCXX/unknown-type-name.cpp | 6 | ||||
-rw-r--r-- | clang/test/SemaTemplate/class-template-decl.cpp | 2 |
16 files changed, 75 insertions, 75 deletions
diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp index 08fefdc91fb..35dbec93e5b 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp @@ -71,7 +71,7 @@ struct ConstexprDtor { template <typename T> constexpr T ft(T t) { return t; } template <typename T> T gt(T t) { return t; } struct S { - template<typename T> constexpr T f(); // expected-warning {{C++1y}} + template<typename T> constexpr T f(); // expected-warning {{C++14}} template <typename T> T g() const; // expected-note-re {{candidate template ignored: could not match 'T (){{( __attribute__\(\(thiscall\)\))?}} const' against 'char (){{( __attribute__\(\(thiscall\)\))?}}'}} }; @@ -82,7 +82,7 @@ template <> char ft(char c) { return c; } // expected-note {{previous}} template <> constexpr char ft(char nl); // expected-error {{constexpr declaration of 'ft<char>' follows non-constexpr declaration}} template <> constexpr int gt(int nl) { return nl; } template <> notlit S::f() const { return notlit(); } -template <> constexpr int S::g() { return 0; } // expected-note {{previous}} expected-warning {{C++1y}} +template <> constexpr int S::g() { return 0; } // expected-note {{previous}} expected-warning {{C++14}} template <> int S::g() const; // expected-error {{non-constexpr declaration of 'g<int>' follows constexpr declaration}} // specializations can drop the 'constexpr' but not the implied 'const'. template <> char S::g() { return 0; } // expected-error {{no function template matches}} diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp index 780a420959d..448351be0c6 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp @@ -21,7 +21,7 @@ struct Literal { struct S { virtual int ImplicitlyVirtual() const = 0; // expected-note {{overridden virtual function}} }; -struct SS : S { +struct SS : S { int ImplicitlyVirtual() const; }; @@ -62,7 +62,7 @@ struct T : SS, NonLiteral { // expected-note {{base class 'NonLiteral' of non-li constexpr T &operator=(const T&) = default; #ifndef CXX1Y // expected-error@-2 {{an explicitly-defaulted copy assignment operator may not have 'const', 'constexpr' or 'volatile' qualifiers}} - // expected-warning@-3 {{C++1y}} + // expected-warning@-3 {{C++14}} #else // expected-error@-5 {{defaulted definition of copy assignment operator is not constexpr}} #endif @@ -161,21 +161,21 @@ constexpr int ForStmt() { constexpr int VarDecl() { int a = 0; #ifndef CXX1Y - // expected-error@-2 {{variable declaration in a constexpr function is a C++1y extension}} + // expected-error@-2 {{variable declaration in a constexpr function is a C++14 extension}} #endif return 0; } constexpr int ConstexprVarDecl() { constexpr int a = 0; #ifndef CXX1Y - // expected-error@-2 {{variable declaration in a constexpr function is a C++1y extension}} + // expected-error@-2 {{variable declaration in a constexpr function is a C++14 extension}} #endif return 0; } constexpr int VarWithCtorDecl() { Literal a; #ifndef CXX1Y - // expected-error@-2 {{variable declaration in a constexpr function is a C++1y extension}} + // expected-error@-2 {{variable declaration in a constexpr function is a C++14 extension}} #endif return 0; } @@ -183,7 +183,7 @@ NonLiteral nl; constexpr NonLiteral &ExternNonLiteralVarDecl() { extern NonLiteral nl; #ifndef CXX1Y - // expected-error@-2 {{variable declaration in a constexpr function is a C++1y extension}} + // expected-error@-2 {{variable declaration in a constexpr function is a C++14 extension}} #endif return nl; } @@ -191,28 +191,28 @@ static_assert(&ExternNonLiteralVarDecl() == &nl, ""); constexpr int FuncDecl() { constexpr int ForwardDecl(int); #ifndef CXX1Y - // expected-error@-2 {{use of this statement in a constexpr function is a C++1y extension}} + // expected-error@-2 {{use of this statement in a constexpr function is a C++14 extension}} #endif return ForwardDecl(42); } constexpr int ClassDecl1() { typedef struct { } S1; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr function is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr function is a C++14 extension}} #endif return 0; } constexpr int ClassDecl2() { using S2 = struct { }; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr function is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr function is a C++14 extension}} #endif return 0; } constexpr int ClassDecl3() { struct S3 { }; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr function is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr function is a C++14 extension}} #endif return 0; } @@ -245,11 +245,11 @@ namespace DR1364 { namespace rdar13584715 { typedef __PTRDIFF_TYPE__ ptrdiff_t; - + template<typename T> struct X { static T value() {}; }; - + void foo(ptrdiff_t id) { switch (id) { case reinterpret_cast<ptrdiff_t>(&X<long>::value): // expected-error{{case value is not a constant expression}} \ @@ -269,7 +269,7 @@ namespace std_example { constexpr int abs(int x) { if (x < 0) #ifndef CXX1Y - // expected-error@-2 {{C++1y}} + // expected-error@-2 {{C++14}} #endif x = -x; return x; @@ -295,7 +295,7 @@ namespace std_example { return r; } #ifndef CXX1Y - // expected-error@-5 {{C++1y}} + // expected-error@-5 {{C++14}} // expected-error@-5 {{statement not allowed}} #endif } diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp index 708c259d5b6..9c1cab54b61 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp @@ -92,37 +92,37 @@ struct V { constexpr V(int(&)[2]) { constexpr int a = 0; #ifndef CXX1Y - // expected-error@-2 {{variable declaration in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{variable declaration in a constexpr constructor is a C++14 extension}} #endif } constexpr V(int(&)[3]) { constexpr int ForwardDecl(int); #ifndef CXX1Y - // expected-error@-2 {{use of this statement in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{use of this statement in a constexpr constructor is a C++14 extension}} #endif } constexpr V(int(&)[4]) { typedef struct { } S1; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr constructor is a C++14 extension}} #endif } constexpr V(int(&)[5]) { using S2 = struct { }; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr constructor is a C++14 extension}} #endif } constexpr V(int(&)[6]) { struct S3 { }; #ifndef CXX1Y - // expected-error@-2 {{type definition in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{type definition in a constexpr constructor is a C++14 extension}} #endif } constexpr V(int(&)[7]) { return; #ifndef CXX1Y - // expected-error@-2 {{use of this statement in a constexpr constructor is a C++1y extension}} + // expected-error@-2 {{use of this statement in a constexpr constructor is a C++14 extension}} #endif } }; diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp index 5e40f69d77b..48973237ea0 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp @@ -102,7 +102,7 @@ X x = cmin(X(), X()); // ok, not constexpr template<typename T> struct Y { constexpr Y() {} - constexpr int get() { return T(); } // expected-warning {{C++1y}} + constexpr int get() { return T(); } // expected-warning {{C++14}} }; struct Z { operator int(); }; diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp index 40aa600ba1f..21e4a23731b 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp @@ -3,13 +3,13 @@ using size_t = decltype(sizeof(int)); struct S { - constexpr int f(); // expected-warning {{C++1y}} + constexpr int f(); // expected-warning {{C++14}} constexpr int g() const; - constexpr int h(); // expected-warning {{C++1y}} + constexpr int h(); // expected-warning {{C++14}} int h(); static constexpr int Sf(); /*static*/ constexpr void *operator new(size_t) noexcept; - template<typename T> constexpr T tm(); // expected-warning {{C++1y}} + template<typename T> constexpr T tm(); // expected-warning {{C++14}} template<typename T> static constexpr T ts(); }; @@ -26,12 +26,12 @@ void f(const S &s) { } constexpr int S::f() const { return 0; } -constexpr int S::g() { return 1; } // expected-warning {{C++1y}} -constexpr int S::h() { return 0; } // expected-warning {{C++1y}} +constexpr int S::g() { return 1; } // expected-warning {{C++14}} +constexpr int S::h() { return 0; } // expected-warning {{C++14}} int S::h() { return 0; } constexpr int S::Sf() { return 2; } constexpr void *S::operator new(size_t) noexcept { return 0; } -template<typename T> constexpr T S::tm() { return T(); } // expected-warning {{C++1y}} +template<typename T> constexpr T S::tm() { return T(); } // expected-warning {{C++14}} template<typename T> constexpr T S::ts() { return T(); } namespace std_example { diff --git a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp index 8a3168e5f80..b0305dd756a 100644 --- a/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp @@ -8,7 +8,7 @@ struct X0 { template<typename T> T X0<T>::value = 0; // expected-error{{no viable conversion}} -struct X1 { +struct X1 { X1(int); }; @@ -19,8 +19,8 @@ X1& get_X1() { return X0<X1>::value; } double*& get_double_ptr() { return X0<int*>::value; } // expected-error{{non-const lvalue reference to type 'double *' cannot bind to a value of unrelated type 'int *'}} -X2& get_X2() { +X2& get_X2() { return X0<X2>::value; // expected-note{{instantiation}} } - -template<typename T> T x; // expected-warning{{variable templates are a C++1y extension}} + +template<typename T> T x; // expected-warning{{variable templates are a C++14 extension}} diff --git a/clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp b/clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp index f804d4db129..580ef3151e5 100644 --- a/clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp @@ -9,7 +9,7 @@ template inline void X<int>::f(); // expected-error{{explicit instantiation cann template<typename T> struct Y { - constexpr int f() { return 0; } // expected-warning{{C++1y}} + constexpr int f() { return 0; } // expected-warning{{C++14}} }; template constexpr int Y<int>::f() const; // expected-error{{explicit instantiation cannot be 'constexpr'}} diff --git a/clang/test/FixIt/fixit-cxx1y-compat.cpp b/clang/test/FixIt/fixit-cxx1y-compat.cpp index 9fd5ff26e55..819e3984c35 100644 --- a/clang/test/FixIt/fixit-cxx1y-compat.cpp +++ b/clang/test/FixIt/fixit-cxx1y-compat.cpp @@ -7,6 +7,6 @@ // This is a test of the code modification hints for C++1y-compatibility problems. struct S { - constexpr int &f(); // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}} + constexpr int &f(); // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}} int &f(); }; diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index 86c2c110f43..57ca725d910 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -1443,7 +1443,7 @@ namespace InvalidClasses { namespace NamespaceAlias { constexpr int f() { - namespace NS = NamespaceAlias; // expected-warning {{use of this statement in a constexpr function is a C++1y extension}} + namespace NS = NamespaceAlias; // expected-warning {{use of this statement in a constexpr function is a C++14 extension}} return &NS::f != nullptr; } } @@ -1700,7 +1700,7 @@ namespace VirtualFromBase { template <typename T> struct X : T { constexpr X() {} double d = 0.0; - constexpr int f() { return sizeof(T); } // expected-warning {{will not be implicitly 'const' in C++1y}} + constexpr int f() { return sizeof(T); } // expected-warning {{will not be implicitly 'const' in C++14}} }; // Virtual f(), not OK. @@ -1715,17 +1715,17 @@ namespace VirtualFromBase { } namespace ConstexprConstructorRecovery { - class X { - public: - enum E : short { - headers = 0x1, - middlefile = 0x2, - choices = 0x4 - }; - constexpr X() noexcept {}; - protected: + class X { + public: + enum E : short { + headers = 0x1, + middlefile = 0x2, + choices = 0x4 + }; + constexpr X() noexcept {}; + protected: E val{0}; // expected-error {{cannot initialize a member subobject of type 'ConstexprConstructorRecovery::X::E' with an rvalue of type 'int'}} - }; + }; constexpr X x{}; } diff --git a/clang/test/SemaCXX/cxx0x-compat.cpp b/clang/test/SemaCXX/cxx0x-compat.cpp index a58a7f875cd..ded51ab704b 100644 --- a/clang/test/SemaCXX/cxx0x-compat.cpp +++ b/clang/test/SemaCXX/cxx0x-compat.cpp @@ -43,7 +43,7 @@ char c = 'x'_x; // expected-warning {{will be treated as a user-defined literal #else -auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++1y}} +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}} #endif diff --git a/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp b/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp index 3f100b8b691..071b39c7fb3 100644 --- a/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp +++ b/clang/test/SemaCXX/cxx1y-constexpr-not-const.cpp @@ -14,5 +14,5 @@ struct X { // expected-error@6 {{non-constexpr declaration of 'f' follows constexpr declaration}} // expected-note@5 {{previous}} #else -// expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}} +// expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}} #endif diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp index b74dcb4238a..9eb0da33f3f 100644 --- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp @@ -49,5 +49,5 @@ unsigned long long ull1 = // expected-warning {{'long long' is incompatible with int k = 0b1001; #ifdef CXX1Y -// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++1y}} +// expected-warning@-2 {{binary integer literals are incompatible with C++ standards before C++14}} #endif diff --git a/clang/test/SemaCXX/cxx98-compat.cpp b/clang/test/SemaCXX/cxx98-compat.cpp index 96af95425ae..4fad458f8ff 100644 --- a/clang/test/SemaCXX/cxx98-compat.cpp +++ b/clang/test/SemaCXX/cxx98-compat.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -verify %s -// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++98-compat -verify %s -DCXX1YCOMPAT +// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++98-compat -verify %s -DCXX14COMPAT namespace std { struct type_info; @@ -373,10 +373,10 @@ namespace rdar11736429 { } template<typename T> T var = T(10); -#ifdef CXX1YCOMPAT -// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}} +#ifdef CXX14COMPAT +// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}} #else -// expected-warning@-4 {{variable templates are a C++1y extension}} +// expected-warning@-4 {{variable templates are a C++14 extension}} #endif // No diagnostic for specializations of variable templates; we will have @@ -388,27 +388,27 @@ float fvar = var<float>; class A { template<typename T> static T var = T(10); -#ifdef CXX1YCOMPAT -// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}} +#ifdef CXX14COMPAT +// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}} #else -// expected-warning@-4 {{variable templates are a C++1y extension}} +// expected-warning@-4 {{variable templates are a C++14 extension}} #endif - template<typename T> static T* var<T*> = new T(); + template<typename T> static T* var<T*> = new T(); }; struct B { template<typename T> static T v; }; -#ifdef CXX1YCOMPAT -// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}} +#ifdef CXX14COMPAT +// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}} #else -// expected-warning@-4 {{variable templates are a C++1y extension}} +// expected-warning@-4 {{variable templates are a C++14 extension}} #endif template<typename T> T B::v = T(); -#ifdef CXX1YCOMPAT -// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}} +#ifdef CXX14COMPAT +// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++14}} #else -// expected-warning@-4 {{variable templates are a C++1y extension}} +// expected-warning@-4 {{variable templates are a C++14 extension}} #endif template<typename T> T* B::v<T*> = new T(); @@ -416,6 +416,6 @@ template<> int B::v<int> = 10; template int B::v<int>; float fsvar = B::v<float>; -#ifdef CXX1YCOMPAT -int digit_seps = 123'456; // expected-warning {{digit separators are incompatible with C++ standards before C++1y}} +#ifdef CXX14COMPAT +int digit_seps = 123'456; // expected-warning {{digit separators are incompatible with C++ standards before C++14}} #endif diff --git a/clang/test/SemaCXX/trailing-return-0x.cpp b/clang/test/SemaCXX/trailing-return-0x.cpp index cf5e659660e..c6b22c54be0 100644 --- a/clang/test/SemaCXX/trailing-return-0x.cpp +++ b/clang/test/SemaCXX/trailing-return-0x.cpp @@ -17,8 +17,8 @@ auto f() -> int return 0; } -auto g(); // expected-error{{return without trailing return type; deduced return types are a C++1y extension}} -decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++1y extension}} +auto g(); // expected-error{{return without trailing return type; deduced return types are a C++14 extension}} +decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++14 extension}} auto badness = g2(); int h() -> int; // expected-error{{trailing return type must specify return type 'auto', not 'int'}} @@ -75,14 +75,14 @@ only<double> p4 = xx.get_nested<double>().h(0L, 1.0, 3.14f); namespace PR12053 { template <typename T> auto f1(T t) -> decltype(f1(t)) {} // expected-note{{candidate template ignored}} - + void test_f1() { f1(0); // expected-error{{no matching function for call to 'f1'}} } - + template <typename T> auto f2(T t) -> decltype(f2(&t)) {} // expected-note{{candidate template ignored}} - + void test_f2() { f2(0); // expected-error{{no matching function for call to 'f2'}} } diff --git a/clang/test/SemaCXX/unknown-type-name.cpp b/clang/test/SemaCXX/unknown-type-name.cpp index f2c84df242f..9d28c310ed9 100644 --- a/clang/test/SemaCXX/unknown-type-name.cpp +++ b/clang/test/SemaCXX/unknown-type-name.cpp @@ -27,7 +27,7 @@ int var(zepelin); // expected-error{{did you mean 'zeppelin'?}} template<typename T> struct A { typedef T type; - + type f(); type g(); @@ -93,14 +93,14 @@ template<typename T> int A<T>::h(T::type x, char) {} // expected-error{{missing template<typename T> int h(T::type, int); // expected-error{{missing 'typename'}} template<typename T> int h(T::type x, char); // expected-error{{missing 'typename'}} -template<typename T> int junk1(T::junk); // expected-warning{{variable templates are a C++1y extension}} +template<typename T> int junk1(T::junk); // expected-warning{{variable templates are a C++14 extension}} template<typename T> int junk2(T::junk) throw(); // expected-error{{missing 'typename'}} template<typename T> int junk3(T::junk) = delete; // expected-error{{missing 'typename'}} expected-warning{{C++11}} template<typename T> int junk4(T::junk j); // expected-error{{missing 'typename'}} // FIXME: We can tell this was intended to be a function because it does not // have a dependent nested name specifier. -template<typename T> int i(T::type, int()); // expected-warning{{variable templates are a C++1y extension}} +template<typename T> int i(T::type, int()); // expected-warning{{variable templates are a C++14 extension}} // FIXME: We know which type specifier should have been specified here. Provide // a fix-it to add 'typename A<T>::type' diff --git a/clang/test/SemaTemplate/class-template-decl.cpp b/clang/test/SemaTemplate/class-template-decl.cpp index b721aab3546..c67361bfeaf 100644 --- a/clang/test/SemaTemplate/class-template-decl.cpp +++ b/clang/test/SemaTemplate/class-template-decl.cpp @@ -57,7 +57,7 @@ void f() { template<typename T> class X; // expected-error{{expression}} } -template<typename T> class X1 var; // expected-warning{{variable templates are a C++1y extension}} \ +template<typename T> class X1 var; // expected-warning{{variable templates are a C++14 extension}} \ // expected-error {{variable has incomplete type 'class X1'}} \ // expected-note {{forward declaration of 'X1'}} |