summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-09-13 20:16:20 +0000
committerDouglas Gregor <dgregor@apple.com>2012-09-13 20:16:20 +0000
commit43bc036e8ae37c5940857f3dcf50bc9441e7c4d0 (patch)
tree74c1faf59f34e2590b7780bba6726321ed90e951 /clang/test/SemaCXX/nested-name-spec.cpp
parent460fc46e0fd34893231ef1ab6d4d9f02f339e443 (diff)
downloadbcm5719-llvm-43bc036e8ae37c5940857f3dcf50bc9441e7c4d0.tar.gz
bcm5719-llvm-43bc036e8ae37c5940857f3dcf50bc9441e7c4d0.zip
Promote the warning about extra qualification on a declaration from a
warning to an error. C++ bans it, and both GCC and EDG diagnose it as an error. Microsoft allows it, so we still warn in Microsoft mode. Fixes <rdar://problem/11135644>. llvm-svn: 163831
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--clang/test/SemaCXX/nested-name-spec.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index b35e3822863..7239646d8d7 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -159,7 +159,7 @@ namespace N {
void f();
// FIXME: if we move this to a separate definition of N, things break!
}
-void ::global_func2(int) { } // expected-warning{{extra qualification on member 'global_func2'}}
+void ::global_func2(int) { } // expected-error{{extra qualification on member 'global_func2'}}
void N::f() { } // okay
@@ -245,15 +245,15 @@ namespace PR7133 {
}
class CLASS {
- void CLASS::foo2(); // expected-warning {{extra qualification on member 'foo2'}}
+ void CLASS::foo2(); // expected-error {{extra qualification on member 'foo2'}}
};
namespace PR8159 {
class B { };
class A {
- int A::a; // expected-warning{{extra qualification on member 'a'}}
- static int A::b; // expected-warning{{extra qualification on member 'b'}}
+ int A::a; // expected-error{{extra qualification on member 'a'}}
+ static int A::b; // expected-error{{extra qualification on member 'b'}}
int ::c; // expected-error{{non-friend class member 'c' cannot have a qualified name}}
};
}
OpenPOWER on IntegriCloud