Preserve invalidity of typeof operands in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111999 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-typeof.cpp b/test/Parser/cxx-typeof.cpp
index 7e89101..4c598e9 100644
--- a/test/Parser/cxx-typeof.cpp
+++ b/test/Parser/cxx-typeof.cpp
@@ -5,3 +5,9 @@
   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'}}
+};