Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-format] Fix preprocessor nesting after commit 529aa4b
In 529aa4b 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 branch information
1 parent
ffa4dfc
commit c9592ae
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters