[clang-format] Add MacroUnexpander.
authorManuel Klimek <klimek@google.com>
Fri, 25 Sep 2020 12:25:08 +0000 (14:25 +0200)
committerManuel Klimek <klimek@google.com>
Tue, 12 Jul 2022 07:11:46 +0000 (07:11 +0000)
commitd6d0dc1f45377ddaf5c10a48d64b09308b71501a
tree97d455feba2d0aee157b295b9129811f8dfa1d15
parentad3a078745d973066cd9ea7b2199c5c666b4cd2a
[clang-format] Add MacroUnexpander.

MacroUnexpander applies the structural formatting of expanded lines into
UnwrappedLines to the corresponding unexpanded macro calls, resulting in
UnwrappedLines for the macro calls the user typed.

Differential Revision: https://reviews.llvm.org/D88299
clang/lib/Format/CMakeLists.txt
clang/lib/Format/FormatToken.h
clang/lib/Format/MacroCallReconstructor.cpp [new file with mode: 0644]
clang/lib/Format/Macros.h
clang/lib/Format/UnwrappedLineParser.h
clang/unittests/Format/CMakeLists.txt
clang/unittests/Format/MacroCallReconstructorTest.cpp [new file with mode: 0644]