aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-typeof.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-24 23:41:43 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-24 23:41:43 +0000
commit124300e428d4e987430e5e79c42f4a760e60d8d3 (patch)
tree9dc19e7736d9953a90af0ba5cc8714e4fa3556fd /test/Parser/cxx-typeof.cpp
parentd43dd83a973c585c39a9a5e5e904282bc2371986 (diff)
Preserve invalidity of typeof operands in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-typeof.cpp')
-rw-r--r--test/Parser/cxx-typeof.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Parser/cxx-typeof.cpp b/test/Parser/cxx-typeof.cpp
index 7e891013e9..4c598e9517 100644
--- a/test/Parser/cxx-typeof.cpp
+++ b/test/Parser/cxx-typeof.cpp
@@ -5,3 +5,9 @@ static void test() {
int x;
typeof pi[x] y;
}
+
+// Part of rdar://problem/8347416; from the gcc test suite.
+struct S {
+ int i;
+ __typeof(S::i) foo(); // expected-error {{invalid use of nonstatic data member 'i'}}
+};