summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/expressions.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/expressions.c')
-rw-r--r--clang/test/Parser/expressions.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Parser/expressions.c b/clang/test/Parser/expressions.c
index 0d1b6c945c5..6c567f91baa 100644
--- a/clang/test/Parser/expressions.c
+++ b/clang/test/Parser/expressions.c
@@ -57,3 +57,13 @@ void test7() {
({} // 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}}
+}
OpenPOWER on IntegriCloud