summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/class/class.static/class.static.data/p3.cpp4
-rw-r--r--clang/test/FixIt/fixit-cxx0x.cpp6
-rw-r--r--clang/test/SemaCXX/class.cpp4
-rw-r--r--clang/test/SemaCXX/cxx0x-class.cpp4
-rw-r--r--clang/test/SemaTemplate/instantiate-static-var.cpp2
5 files changed, 9 insertions, 11 deletions
diff --git a/clang/test/CXX/class/class.static/class.static.data/p3.cpp b/clang/test/CXX/class/class.static/class.static.data/p3.cpp
index 72dbec771ae..51b93a2e8f9 100644
--- a/clang/test/CXX/class/class.static/class.static.data/p3.cpp
+++ b/clang/test/CXX/class/class.static/class.static.data/p3.cpp
@@ -12,8 +12,8 @@ struct S {
static const int d;
static constexpr double e = 0.0; // ok
- static const double f = 0.0; // expected-warning {{accepted as an extension}}
- static char *const g = 0; // expected-warning {{accepted as an extension}}
+ static const double f = 0.0; // expected-warning {{extension}}
+ static char *const g = 0; // expected-error {{requires 'constexpr' specifier}}
static const NonLit h = NonLit(); // expected-error {{must be initialized out of line}}
};
diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp
index 2addad4696e..8c404b66119 100644
--- a/clang/test/FixIt/fixit-cxx0x.cpp
+++ b/clang/test/FixIt/fixit-cxx0x.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -verify -std=c++0x %s
// RUN: cp %s %t
-// RUN: not %clang_cc1 -x c++ -std=c++0x -Werror -fixit %t
+// RUN: not %clang_cc1 -x c++ -std=c++0x -fixit %t
// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++0x %t
/* This is a test of the various code modification hints that only
@@ -53,9 +53,7 @@ namespace Constexpr {
#endif
struct S {
- static const double d = 0.0; // expected-warning {{accepted as an extension}}
- // -> constexpr static const double d = 0.0;
- static char *const p = 0; // expected-warning {{accepted as an extension}}
+ static char *const p = 0; // expected-error {{requires 'constexpr' specifier}}
// -> constexpr static char *const p = 0;
};
}
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp
index 725e93f40c6..8d1257895fb 100644
--- a/clang/test/SemaCXX/class.cpp
+++ b/clang/test/SemaCXX/class.cpp
@@ -173,8 +173,8 @@ namespace rdar8367341 {
float foo();
struct A {
- static const float x = 5.0f; // expected-warning {{in-class initializer for static data member of type 'const float' not allowed}}
- static const float y = foo(); // expected-warning {{in-class initializer for static data member of type 'const float' not allowed}} expected-error {{in-class initializer is not a constant expression}}
+ 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}}
};
}
diff --git a/clang/test/SemaCXX/cxx0x-class.cpp b/clang/test/SemaCXX/cxx0x-class.cpp
index 4c23932a719..bd857e07feb 100644
--- a/clang/test/SemaCXX/cxx0x-class.cpp
+++ b/clang/test/SemaCXX/cxx0x-class.cpp
@@ -20,8 +20,8 @@ namespace rdar8367341 {
float foo();
struct A {
- static const float x = 5.0f; // expected-warning {{requires 'constexpr' specifier}}
- static const float y = foo(); // expected-warning {{requires 'constexpr' specifier}} expected-error {{must be initialized by a constant expression}}
+ static const float x = 5.0f; // expected-warning {{GNU extension}}
+ static const float y = foo(); // expected-warning {{GNU extension}} expected-error {{in-class initializer 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}}
};
diff --git a/clang/test/SemaTemplate/instantiate-static-var.cpp b/clang/test/SemaTemplate/instantiate-static-var.cpp
index 723cbd388f6..d2b0459ccc5 100644
--- a/clang/test/SemaTemplate/instantiate-static-var.cpp
+++ b/clang/test/SemaTemplate/instantiate-static-var.cpp
@@ -11,7 +11,7 @@ X<int, 0> xi0; // expected-note{{in instantiation of template class 'X<int, 0>'
template<typename T>
class Y {
- static const T value = 0; // expected-warning{{in-class initializer for static data member of type 'const float' not allowed, accepted as an extension}}
+ static const T value = 0; // expected-warning{{in-class initializer for static data member of type 'const float' is a GNU extension}}
};
Y<float> fy; // expected-note{{in instantiation of template class 'Y<float>' requested here}}
OpenPOWER on IntegriCloud