diff options
Diffstat (limited to 'test/SemaCXX')
-rw-r--r-- | test/SemaCXX/MicrosoftCompatibility.cpp | 2 | ||||
-rw-r--r-- | test/SemaCXX/PR9572.cpp | 2 | ||||
-rw-r--r-- | test/SemaCXX/c99-variable-length-array.cpp | 24 | ||||
-rw-r--r-- | test/SemaCXX/c99.cpp | 4 | ||||
-rw-r--r-- | test/SemaCXX/class.cpp | 6 | ||||
-rw-r--r-- | test/SemaCXX/constant-expression-cxx11.cpp | 6 | ||||
-rw-r--r-- | test/SemaCXX/cxx0x-class.cpp | 4 | ||||
-rw-r--r-- | test/SemaCXX/i-c-e-cxx.cpp | 2 |
8 files changed, 25 insertions, 25 deletions
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp index 4ae949544e..4db5437205 100644 --- a/test/SemaCXX/MicrosoftCompatibility.cpp +++ b/test/SemaCXX/MicrosoftCompatibility.cpp @@ -84,7 +84,7 @@ private: class C : public B {
private:
- using B::f; // expected-warning {{using declaration refers to inaccessible member 'ms_using_declaration_bug::B::f', which refers to accessible member 'ms_using_declaration_bug::A::f', accepted for Microsoft compatibility}}
+ using B::f; // expected-warning {{using declaration referring to inaccessible member 'ms_using_declaration_bug::B::f' (which refers to accessible member 'ms_using_declaration_bug::A::f') is a Microsoft compatibility extension}}
};
}
diff --git a/test/SemaCXX/PR9572.cpp b/test/SemaCXX/PR9572.cpp index b0bbfa6318..b475b57416 100644 --- a/test/SemaCXX/PR9572.cpp +++ b/test/SemaCXX/PR9572.cpp @@ -3,7 +3,7 @@ class Base { virtual ~Base(); // expected-note {{implicitly declared private here}} }; struct Foo : public Base { // expected-error {{base class 'Base' has private destructor}} - const int kBlah = 3; // expected-warning {{accepted as a C++11 extension}} + const int kBlah = 3; // expected-warning {{is a C++11 extension}} Foo(); }; struct Bar : public Foo { diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp index 3f1d6a8a55..37115abc68 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -14,8 +14,8 @@ struct POD { // We allow VLAs of POD types, only. void vla(int N) { - int array1[N]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} - POD array2[N]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + int array1[N]; // expected-warning{{variable length arrays are a C99 feature}} + POD array2[N]; // expected-warning{{variable length arrays are a C99 feature}} NonPOD array3[N]; // expected-error{{variable length array of non-POD element type 'NonPOD'}} NonPOD2 array4[N][3]; // expected-error{{variable length array of non-POD element type 'NonPOD2'}} } @@ -23,7 +23,7 @@ void vla(int N) { /// Warn about VLAs in templates. template<typename T> void vla_in_template(int N, T t) { - int array1[N]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + int array1[N]; // expected-warning{{variable length arrays are a C99 feature}} } struct HasConstantValue { @@ -36,7 +36,7 @@ struct HasNonConstantValue { template<typename T> void vla_in_template(T t) { - int array2[T::value]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + int array2[T::value]; // expected-warning{{variable length arrays are a C99 feature}} } template void vla_in_template<HasConstantValue>(HasConstantValue); @@ -47,14 +47,14 @@ template<typename T> struct X0 { }; // Cannot use any variably-modified type with a template parameter or // argument. void inst_with_vla(int N) { - int array[N]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + int array[N]; // expected-warning{{variable length arrays are a C99 feature}} X0<__typeof__(array)> x0a; // expected-error{{variably modified type 'typeof (array)' (aka 'int [N]') cannot be used as a template argument}} } template<typename T> struct X1 { template<int (&Array)[T::value]> // expected-error{{non-type template parameter of variably modified type 'int (&)[HasNonConstantValue::value]'}} \ - // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + // expected-warning{{variable length arrays are a C99 feature}} struct Inner { }; @@ -68,7 +68,7 @@ template<typename T, unsigned N> void accept_array(T (&array)[N]); // expected-note{{candidate template ignored: failed template argument deduction}} void test_accept_array(int N) { - int array[N]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + int array[N]; // expected-warning{{variable length arrays are a C99 feature}} accept_array(array); // expected-error{{no matching function for call to 'accept_array'}} } @@ -77,7 +77,7 @@ void local_classes(int N) { struct X { int size; int array[N]; // expected-error{{fields must have a constant size: 'variable length array in structure' extension will never be supported}} \ - // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + // expected-warning{{variable length arrays are a C99 feature}} }; } @@ -87,7 +87,7 @@ namespace PR7206 { float left; float right; }; - struct edge_info edgeInfo[x]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + struct edge_info edgeInfo[x]; // expected-warning{{variable length arrays are a C99 feature}} } } @@ -95,7 +95,7 @@ namespace rdar8020206 { template<typename T> void f(int i) { const unsigned value = i; - int array[value * i]; // expected-warning 2{{variable length arrays are a C99 feature, accepted as an extension}} + int array[value * i]; // expected-warning 2{{variable length arrays are a C99 feature}} } template void f<int>(int); // expected-note{{instantiation of}} @@ -109,7 +109,7 @@ namespace rdar8021385 { typedef typename T::my_int my_int; void f0() { int M = 4; - my_int a[M]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + my_int a[M]; // expected-warning{{variable length arrays are a C99 feature}} } }; B<A> a; @@ -117,7 +117,7 @@ namespace rdar8021385 { namespace PR8209 { void f(int n) { - typedef int vla_type[n]; // expected-warning{{variable length arrays are a C99 feature, accepted as an extension}} + typedef int vla_type[n]; // expected-warning{{variable length arrays are a C99 feature}} (void)new vla_type; // expected-error{{variably}} } } diff --git a/test/SemaCXX/c99.cpp b/test/SemaCXX/c99.cpp index cda069cf47..13918dcf5e 100644 --- a/test/SemaCXX/c99.cpp +++ b/test/SemaCXX/c99.cpp @@ -4,6 +4,6 @@ void f1(int i[static 5]) { // expected-error{{C99}} struct Point { int x; int y; }; -Point p1 = { .x = 17, // expected-warning{{designated initializers are a C99 feature, accepted in C++ as an extension}} - y: 25 }; // expected-warning{{designated initializers are a C99 feature, accepted in C++ as an extension}} \ +Point p1 = { .x = 17, // expected-warning{{designated initializers are a C99 feature}} + y: 25 }; // expected-warning{{designated initializers are a C99 feature}} \ // expected-warning{{use of GNU old-style field designator extension}} diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp index 30b977913a..e079d0cc17 100644 --- a/test/SemaCXX/class.cpp +++ b/test/SemaCXX/class.cpp @@ -34,10 +34,10 @@ public: enum E1 { en1, en2 }; - int i = 0; // expected-warning {{in-class initialization of non-static data member accepted as a C++11 extension}} + int i = 0; // expected-warning {{in-class initialization of non-static data member is a C++11 extension}} static int si = 0; // expected-error {{non-const static data member must be initialized out of line}} static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} - static const int nci = vs; // expected-error {{in-class initializer is not a constant expression}} + static const int nci = vs; // expected-error {{in-class initializer for static data member is not a constant expression}} static const int vi = 0; static const volatile int cvi = 0; // ok, illegal in C++11 static const E evi = 0; @@ -174,7 +174,7 @@ namespace rdar8367341 { struct A { static const float x = 5.0f; // expected-warning {{in-class initializer for static data member of type 'const float' is a GNU extension}} - static const float y = foo(); // expected-warning {{in-class initializer for static data member of type 'const float' is a GNU extension}} expected-error {{in-class initializer is not a constant expression}} + static const float y = foo(); // expected-warning {{in-class initializer for static data member of type 'const float' is a GNU extension}} expected-error {{in-class initializer for static data member is not a constant expression}} }; } diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp index d78c16cca6..3dbb3c7e9e 100644 --- a/test/SemaCXX/constant-expression-cxx11.cpp +++ b/test/SemaCXX/constant-expression-cxx11.cpp @@ -168,7 +168,7 @@ namespace FunctionCast { constexpr int f() { return 1; } typedef double (*DoubleFn)(); typedef int (*IntFn)(); - int a[(int)DoubleFn(f)()]; // expected-error {{variable length array}} expected-warning{{extension}} + int a[(int)DoubleFn(f)()]; // expected-error {{variable length array}} expected-warning{{C99 feature}} int b[(int)IntFn(f)()]; // ok } @@ -462,7 +462,7 @@ static_assert(fail(*(&(&(*(*&(&zs[2] - 1)[0] + 2 - 2))[2])[-1][-1] + 1)) == 11, expected-error {{static_assert expression is not an integral constant expression}} \ expected-note {{in call to 'fail(zs[1][0][1][0])'}} -constexpr int arr[40] = { 1, 2, 3, [8] = 4 }; // expected-warning {{extension}} +constexpr int arr[40] = { 1, 2, 3, [8] = 4 }; // expected-warning {{C99 feature}} constexpr int SumNonzero(const int *p) { return *p + (*p ? SumNonzero(p+1) : 0); } @@ -718,7 +718,7 @@ union U { int b; }; -constexpr U u[4] = { { .a = 0 }, { .b = 1 }, { .a = 2 }, { .b = 3 } }; // expected-warning 4{{extension}} +constexpr U u[4] = { { .a = 0 }, { .b = 1 }, { .a = 2 }, { .b = 3 } }; // expected-warning 4{{C99 feature}} static_assert(u[0].a == 0, ""); static_assert(u[0].b, ""); // expected-error {{constant expression}} expected-note {{read of member 'b' of union with active member 'a'}} static_assert(u[1].b == 1, ""); diff --git a/test/SemaCXX/cxx0x-class.cpp b/test/SemaCXX/cxx0x-class.cpp index 2ceacfc9b2..d5590c5e22 100644 --- a/test/SemaCXX/cxx0x-class.cpp +++ b/test/SemaCXX/cxx0x-class.cpp @@ -11,7 +11,7 @@ public: int i = 0; static int si = 0; // expected-error {{non-const static data member must be initialized out of line}} static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} - static const int nci = vs; // expected-error {{in-class initializer is not a constant expression}} + static const int nci = vs; // expected-error {{in-class initializer for static data member is not a constant expression}} static const int vi = 0; static const volatile int cvi = 0; // expected-error {{static const volatile data member must be initialized out of line}} }; @@ -21,7 +21,7 @@ namespace rdar8367341 { struct A { static const float x = 5.0f; // expected-warning {{GNU extension}} expected-note {{use 'constexpr' specifier to silence this warning}} - static const float y = foo(); // expected-warning {{GNU extension}} expected-note {{use 'constexpr' specifier to silence this warning}} expected-error {{in-class initializer is not a constant expression}} + static const float y = foo(); // expected-warning {{GNU extension}} expected-note {{use 'constexpr' specifier to silence this warning}} expected-error {{in-class initializer for static data member is not a constant expression}} static constexpr float x2 = 5.0f; static constexpr float y2 = foo(); // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr function 'foo'}} }; diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp index eae354814b..47a47b5e2f 100644 --- a/test/SemaCXX/i-c-e-cxx.cpp +++ b/test/SemaCXX/i-c-e-cxx.cpp @@ -48,7 +48,7 @@ void pr6373(const unsigned x = 0) { namespace rdar9204520 { struct A { - static const int B = int(0.75 * 1000 * 1000); // expected-warning {{not a constant expression, accepted as an extension}} + static const int B = int(0.75 * 1000 * 1000); // expected-warning {{not a constant expression; folding it to a constant is a GNU extension}} }; int foo() { return A::B; } |