Commit Graph

2 Commits

Author SHA1 Message Date
Owen Pan e33243c950 [clang-format] Link the braces of a block in UnwrappedLineParser
This includes TT_MacroBlockBegin and TT_MacroBlockEnd as well.

We can no longer use MatchingParen of FormatToken as an indicator
to mark optional braces. Instead, we directly set Optional of an
l_brace first and reset it later if it turns out that the braces
are not optional.

Also added a test case for deeply nested loops.

Differential Revision: https://reviews.llvm.org/D139257
2022-12-04 12:01:26 -08:00
owenca 30ea3fcc4c [clang-format][NFC] Move BracesRemover tests out of FormatTest.cpp
Differential Revision: https://reviews.llvm.org/D136830
2022-10-28 23:44:41 -07:00