aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/expressions.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/expressions.c')
-rw-r--r--test/Parser/expressions.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c
index 0d1b6c945c5c..95d6fb354f3f 100644
--- a/test/Parser/expressions.c
+++ b/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 {{expected parentheses around type name in sizeof expression}}
+ int x2 = sizeof struct pr16992; // expected-error {{expected parentheses around type name in sizeof expression}}
+ int x3 = __alignof int; // expected-error {{expected parentheses around type name in __alignof expression}}
+ int x4 = _Alignof int; // expected-error {{expected parentheses around type name in _Alignof expression}}
+}