This (invalid) fragment is crashing clang-format:
#if 1 int x; #elif int y; #endif
The reason being that the parser expects a token after #elif, and the
subsequent parsing of the next line does not check if CurrentToken is null.
Differential D65940
[clang-format] fix crash involving invalid preprocessor line krasimir on Aug 8 2019, 4:44 AM. Authored by
Details This (invalid) fragment is crashing clang-format: #if 1 int x; #elif int y; #endif The reason being that the parser expects a token after #elif, and the
Diff Detail
|
// #elif directive without a condition. -- to follow the existing comment format in other tests.