From 43bc036e8ae37c5940857f3dcf50bc9441e7c4d0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 13 Sep 2012 20:16:20 +0000 Subject: 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 . llvm-svn: 163831 --- clang/test/SemaCXX/nested-name-spec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/test/SemaCXX/nested-name-spec.cpp') 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}} }; } -- cgit v1.2.3