Index: clang/lib/Format/Format.cpp =================================================================== --- clang/lib/Format/Format.cpp +++ clang/lib/Format/Format.cpp @@ -3169,18 +3169,18 @@ typedef std::function( const Environment &)> AnalyzerPass; - SmallVector Passes; - - if (Style.isCpp() && Style.QualifierAlignment != FormatStyle::QAS_Leave) { - Passes.emplace_back([&](const Environment &Env) { - return QualifierAlignmentFixer(Env, Expanded, Code, Ranges, - FirstStartColumn, NextStartColumn, - LastStartColumn, FileName) - .process(); - }); - } + SmallVector Passes; if (Style.isCpp()) { + if (Style.QualifierAlignment != FormatStyle::QAS_Leave) { + Passes.emplace_back([&](const Environment &Env) { + return QualifierAlignmentFixer(Env, Expanded, Code, Ranges, + FirstStartColumn, NextStartColumn, + LastStartColumn, FileName) + .process(); + }); + } + if (Style.InsertBraces) Passes.emplace_back([&](const Environment &Env) { return BracesInserter(Env, Expanded).process();