[clang-format] Don't crash on malformed preprocessor conditions
Previously the program would crash on this input: ``` #else #if X ``` The problem was that in `parsePPElse`, `PPBranchLevel` would be incremented when the first `#else` gets parsed, but `PPLevelBranchCount` and `PPLevelBranchIndex` would not be updated together. I found the problem when working on D135740. Differential Revision: https://reviews.llvm.org/D135972
Loading
Please sign in to comment