[clang] [Clang][Lex] Fix crash when empty macro arguments leave a trailing ## (PR #239693)

Daniel Petrovic via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 00:19:51 PST 2026


daniel-petrovic wrote:

> The updated PR title seems to reflect a misconception that consecutive `##` operators always result in an ill-formed program.
> 
> A macro invocation of `PASTE1()`, with `PASTE1` defined as follows, is not ill-formed:
> 
> ```c++
> #define PASTE1(X) X ## X X ## ## X X ## X
> ```
> 
> Please adjust the PR title and update the testing to include the case above.

Test added. PR Title updated, but maybe you'd have some better suggestion ?

https://github.com/llvm/llvm-project/pull/239693


More information about the cfe-commits mailing list