[clang-format] Fix a bug in RemoveBracesLLVM
authorowenca <owenpiano@gmail.com>
Fri, 10 Jun 2022 20:01:27 +0000 (13:01 -0700)
committerowenca <owenpiano@gmail.com>
Sat, 11 Jun 2022 08:12:11 +0000 (01:12 -0700)
commit05d771021ad9de12f3e657d464d18731a13578ab
treead1bafc876fcc231bbe09160157173b59f06b5a3
parent6cf83480ea631b05bdab8b32a5903728685a6c2a
[clang-format] Fix a bug in RemoveBracesLLVM

Remove the braces of an else block only if the r_brace of the block
is followed by an if.

Differential Revision: https://reviews.llvm.org/D127532
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/FormatTest.cpp