diff options
Diffstat (limited to 'test/Parser/expressions.c')
-rw-r--r-- | test/Parser/expressions.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c index 0d1b6c9..95d6fb3 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}} +} |