The grammar for GNU typeof in C requires an expression to be
parenthesized, unlike in C++, e.g.,

  C has: typeof ( expression) 
  C++ has: typeof unary-expression

So, once we've parsed a parenthesized expression after typeof, we
should only go on to parse the postfix expression suffix if we're in
C++. Fixes <rdar://problem/8237491>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109606 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/typeof.c b/test/Parser/typeof.c
index cf0e47a..7953a69 100644
--- a/test/Parser/typeof.c
+++ b/test/Parser/typeof.c
@@ -17,3 +17,10 @@
   int xx;
   int *i;
 }
+
+// <rdar://problem/8237491>
+void test2() {
+    int a;
+    short b;
+    __typeof__(a) (*f)(__typeof__(b));    
+}