1 // RUN: %clang -cc1 -fsyntax-only -verify %s 2>&1
3 #define X(val2) Y(val2++) // expected-note {{macro 'X' defined here}}
4 #define Y(expression) expression ;
7 // https://github.com/llvm/llvm-project/issues/60722:
9 // - Due to to the error recovery, the lexer inserts a pair of () around the
10 // macro argument int{,}, so we will see [(, int, {, ,, }, )] tokens.
11 // - however, the size of file id for the macro argument only takes account
12 // the written tokens int{,} , and the extra inserted ) token points to the
13 // Limit source location which triggered an empty Partition violation.
14 X(int{,}); // expected-error {{too many arguments provided to function-like macro invocation}} \
15 expected
-error
{{expected expression
}} \
16 expected
-note
{{parentheses are required around macro argument containing braced initializer list
}}