Tighten up Parser::ParseTypeofSpecifier().
Add some more tests to typeof.c. Also added a couple of missing "expect" attributes that caused the test to fail.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40656 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/typeof.c b/test/Parser/typeof.c
index 4829713..8556687 100644
--- a/test/Parser/typeof.c
+++ b/test/Parser/typeof.c
@@ -5,11 +5,16 @@
 static void test() {
   int *pi;
 
+  int typeof (int) aIntInt; // expected-error{{cannot combine with previous 'int' declaration specifier}} expected-warning{{extension used}}
+  short typeof (int) aShortInt; // expected-error{{'short typeof' is invalid}} expected-warning{{extension used}}
+  int int ttt; // expected-error{{cannot combine with previous 'int' declaration specifier}}
   typeof(TInt) anInt; // expected-warning{{extension used}}
+  short TInt eee; // expected-error{{parse error}}
+  void ary[7] fff; // expected-error{{array has incomplete element type 'void'}} expected-error{{parse error}}
+  typeof(void ary[7]) anIntError; // expected-warning{{extension used}} expected-error{{expected ')'}} expected-error{{to match this '('}}
   typeof(const int) aci; // expected-warning{{extension used}}
   const typeof (*pi) aConstInt; // expected-warning{{extension used}}
   int xx;
-  short typeof (*pi) aShortInt; // expected-error{{'short typeof' is invalid}}
   int *i;
   i = aci; // expected-warning{{incompatible types assigning 'typeof(int const)' to 'int *'}}
   i = anInt; // expected-warning{{incompatible types assigning 'typeof(TInt)' to 'int *'}}