[clang] Diagnose the code with trailing comma in the function call. (PR #125232)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 05:50:03 PST 2025


hokein wrote:

clang19 rejects this code as well, https://godbolt.org/z/Yf96W8KWv. 

To make this case work, I think we should use the `__VA_OPT__`.

`#define debug_nok(...) fprintf(stderr, "qwerty" __VA_OPT__(,) ## __VA_ARGS__)`

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


More information about the cfe-commits mailing list