summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 03:11:12 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 03:11:12 +0000
commitd202924db623cf8141f9984d38e84ed6656809a4 (patch)
tree08f25529f79cdb7c853a4fec460399f009cec809 /clang/test
parent9a6d4f3644be9ccdb6282b9b83553968b05a72ed (diff)
downloadbcm5719-llvm-d202924db623cf8141f9984d38e84ed6656809a4.tar.gz
bcm5719-llvm-d202924db623cf8141f9984d38e84ed6656809a4.zip
Clarify the diagnostic for -Wnested-anon-types.
llvm-svn: 174032
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/anonymous-union.cpp10
-rw-r--r--clang/test/SemaCXX/constant-expression-cxx11.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/anonymous-union.cpp b/clang/test/SemaCXX/anonymous-union.cpp
index e77f5251473..93b5b0abbaf 100644
--- a/clang/test/SemaCXX/anonymous-union.cpp
+++ b/clang/test/SemaCXX/anonymous-union.cpp
@@ -9,7 +9,7 @@ struct X {
int i;
float f;
- union { // expected-warning{{nested anonymous types are an extension}}
+ union { // expected-warning{{anonymous types declared in an anonymous union are an extension}}
float f2;
mutable double d;
};
@@ -101,7 +101,7 @@ void g() {
struct BadMembers {
union {
struct X { }; // expected-error {{types cannot be declared in an anonymous union}}
- struct { int x; int y; } y; // expected-warning{{nested anonymous types are an extension}}
+ struct { int x; int y; } y; // expected-warning{{anonymous types declared in an anonymous union are an extension}}
void f(); // expected-error{{functions cannot be declared in an anonymous union}}
private: int x1; // expected-error{{anonymous union cannot contain a private data member}}
@@ -128,7 +128,7 @@ namespace test4 {
struct { // expected-warning{{anonymous structs are a GNU extension}}
int s0; // expected-note {{declared private here}}
double s1; // expected-note {{declared private here}}
- union { // expected-warning{{nested anonymous type}}
+ union { // expected-warning{{anonymous types declared in an anonymous struct are an extension}}
int su0; // expected-note {{declared private here}}
double su1; // expected-note {{declared private here}}
};
@@ -136,7 +136,7 @@ namespace test4 {
union {
int u0; // expected-note {{declared private here}}
double u1; // expected-note {{declared private here}}
- struct { // expected-warning{{anonymous structs are a GNU extension}} expected-warning{{nested anonymous type}}
+ struct { // expected-warning{{anonymous structs are a GNU extension}} expected-warning{{anonymous types declared in an anonymous union are an extension}}
int us0; // expected-note {{declared private here}}
double us1; // expected-note {{declared private here}}
};
@@ -187,7 +187,7 @@ namespace PR8326 {
private:
const union { // expected-warning{{anonymous union cannot be 'const'}}
- struct { // expected-warning{{anonymous structs are a GNU extension}} expected-warning{{nested anonymous type}}
+ struct { // expected-warning{{anonymous structs are a GNU extension}} expected-warning{{declared in an anonymous union}}
T x;
T y;
};
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp
index 8bb448cab03..30aa7d7b0b3 100644
--- a/clang/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp
@@ -1153,8 +1153,8 @@ namespace ConvertedConstantExpr {
namespace IndirectField {
struct S {
struct { // expected-warning {{GNU extension}}
- union { // expected-warning {{nested anonymous types are an extension}}
- struct { // expected-warning {{GNU extension}} expected-warning {{nested anonymous types are an extension}}
+ union { // expected-warning {{declared in an anonymous struct}}
+ struct { // expected-warning {{GNU extension}} expected-warning {{declared in an anonymous union}}
int a;
int b;
};
OpenPOWER on IntegriCloud