aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-13 22:19:53 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-13 22:19:53 +0000
commit922fff2c9ef458fc04839e45a79552513f41ec7e (patch)
tree0420dec1722138a7d5d9fa3cf1e0a2b034c6d076 /test/SemaCXX/nested-name-spec.cpp
parent096428b351ebf5de9871ce11e06ba6f2d8276ab5 (diff)
Generalize the checking for qualification of (non-friend) class
members. Provide a hard error when the qualification doesn't match the current class type, or a warning + Fix-it if it does match the current class type. Fixes PR8159. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index bef8570bff..8d33f819af 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -248,3 +248,13 @@ namespace PR7133 {
class CLASS {
void CLASS::foo2(); // expected-warning {{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 ::c; // expected-error{{non-friend class member 'c' cannot have a qualified name}}
+ };
+}