diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1833,7 +1833,9 @@ class BracesInserter : public TokenAnalyzer { public: BracesInserter(const Environment &Env, const FormatStyle &Style) - : TokenAnalyzer(Env, Style) {} + : TokenAnalyzer(Env, Style) { + this->Style.RemoveBracesLLVM = false; + } std::pair analyze(TokenAnnotator &Annotator, @@ -1875,7 +1877,9 @@ class BracesRemover : public TokenAnalyzer { public: BracesRemover(const Environment &Env, const FormatStyle &Style) - : TokenAnalyzer(Env, Style) {} + : TokenAnalyzer(Env, Style) { + this->Style.InsertBraces = false; + } std::pair analyze(TokenAnnotator &Annotator,