aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-10 14:49:18 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-10 14:49:18 +0000
commit147545d698972cfd34ece30a5d55e8180784161e (patch)
tree596d4b9451a02b67059816484b580445591c37f8 /test/SemaCXX/class.cpp
parent25aaff9cf8a66bc236e5ccaf6183d11c14674cd3 (diff)
Parse the initializer for a class member after handling its
declarator, so that the declarator is in scope for the initializer. Fixes PR9989. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/class.cpp')
-rw-r--r--test/SemaCXX/class.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp
index 8d1257895f..52b062b5a7 100644
--- a/test/SemaCXX/class.cpp
+++ b/test/SemaCXX/class.cpp
@@ -189,3 +189,7 @@ void f() {
S::c; // expected-error {{invalid use of nonstatic data member}}
}
}
+
+struct PR9989 {
+ static int const PR9989_Member = sizeof PR9989_Member;
+};