Remove the braces of an else block only if the r_brace of the block is followed by an if.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
| Paths 
 |  Differential  D127532  
[clang-format] Fix a bug in RemoveBracesLLVM ClosedPublic Authored by owenpan on Jun 10 2022, 1:12 PM. 
Details Summary Remove the braces of an else block only if the r_brace of the block is followed by an if. 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Jun 10 2022, 2:54 PM This revision was landed with ongoing or failed builds.Jun 11 2022, 1:12 AM Closed by commit rG05d771021ad9: [clang-format] Fix a bug in RemoveBracesLLVM (authored by owenpan).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 436121 clang/lib/Format/UnwrappedLineParser.cpp
 clang/unittests/Format/FormatTest.cpp
 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||