aboutsummaryrefslogtreecommitdiff
path: root/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
commit75379455fc88ca1f021e55ffe1cab3a9c2b2a37a (patch)
tree8dc98169feca7e6786c4b338ae095f220b7a3cc3 /test/SemaCXX/nested-name-spec.cpp
parentceb07622bacde3184b19caf0957f5eeba5cb6784 (diff)
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index b35e382286..7239646d8d 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/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}}
};
}