Skip to content

Commit 1c32551

Browse files
committed
Add test for #if , (leading comma syntax error)
1 parent 52bc5db commit 1c32551

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/test/Preprocessor/cxx_oper_comma.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@
3030
// Test 5: Comma in #elif
3131
#if 0
3232
#elif (1, 2) // expected-error {{comma operator in operand of #if}}
33+
#endif
34+
35+
// Test 6: Leading comma (syntax error)
36+
// expected-error@+1 {{invalid token at start of a preprocessor expression}}
37+
#if ,
3338
#endif

0 commit comments

Comments
 (0)