Open galenelias opened 1 year ago
@llvm/issue-subscribers-clang-format
The code becomes
void {}
by preprocessor and can't be compiled.
Would it make any sense to make it so clang-format only does macro replacement when there is the correct number of parameters? E.g. if I have #define MyMacro(param1, param2, param3)
then can we make it so clang-format only does the macro replacement if the callsite has exactly 3 arguments? (no more & no less)
Hit this when just testing some clang-format behavior (using current main branch), so probably not much of a 'real' use case, but still probably shouldn't crash / trigger an access violation.
When the clang-format file specifies a macro expansion that conflicts with actual usage in some files:
_clang-format:
Source:
Command line to repro:
Crashing line:
Debug crash callstack: (I think Release probably just crashes with an access violation on the following line)