Add fixits suggesting parenthesis around type name in expressions like sizeof.
This fixes PR16992 - Fixit missing when "sizeof type" found.
llvm-svn: 192200
diff --git a/clang/test/Parser/expressions.c b/clang/test/Parser/expressions.c
index 0d1b6c9..6c567f9 100644
--- a/clang/test/Parser/expressions.c
+++ b/clang/test/Parser/expressions.c
@@ -57,3 +57,13 @@
({} // expected-note {{to match}}
; // expected-error {{expected ')'}}
}
+
+// PR16992
+struct pr16992 { int x; };
+
+void func_16992 () {
+ int x1 = sizeof int; // expected-error{{missed parenthesis around the type name in sizeof}}
+ int x2 = sizeof struct pr16992; // expected-error{{missed parenthesis around the type name in sizeof}}
+ int x3 = __alignof int; // expected-error{{missed parenthesis around the type name in __alignof}}
+ int x4 = _Alignof int; // expected-error{{missed parenthesis around the type name in _Alignof}}
+}