[clang-format] Fix preprocessor nesting after commit 529aa4b0
In https://github.com/llvm/llvm-project/commit/529aa4b011c4ae808d658022ef643c44dd9b2c9c by setting the identifier info to nullptr, we started to subtly interfere with the parts in the beginning of the function, https://github.com/llvm/llvm-project/blob/529aa4b011c4ae808d658022ef643c44dd9b2c9c/clang/lib/Format/UnwrappedLineParser.cpp#L991 causing the preprocessor nesting to change in some cases. E.g., for the added regression test, clang-format started incorrectly guessing the language as C++. This tries to address this by introducing an internal identifier info element to use instead. Reviewed By: curdeius, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D120315
Loading
Please sign in to comment