diff options
| -rw-r--r-- | clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp | 15 | 
1 files changed, 6 insertions, 9 deletions
diff --git a/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp b/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp index 7f97b8f81fa..24a430f0dbb 100644 --- a/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp +++ b/clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp @@ -97,16 +97,13 @@ int main(int argc, char **argv) {        IntrusiveRefCntPtr<DiagnosticIDs>(new DiagnosticIDs()), DiagOpts.get());    // Determine a formatting style from options. -  format::FormatStyle FormatStyle; -  if (DoFormat) { -    auto FormatStyleOrError = -        format::getStyle(FormatStyleOpt, FormatStyleConfig, "LLVM"); -    if (!FormatStyleOrError) { -      llvm::errs() << llvm::toString(FormatStyleOrError.takeError()) << "\n"; -      return 1; -    } -    FormatStyle = *FormatStyleOrError; +  auto FormatStyleOrError = +      format::getStyle(FormatStyleOpt, FormatStyleConfig, "LLVM"); +  if (!FormatStyleOrError) { +    llvm::errs() << llvm::toString(FormatStyleOrError.takeError()) << "\n"; +    return 1;    } +  format::FormatStyle FormatStyle = std::move(*FormatStyleOrError);    TUReplacements TURs;    TUReplacementFiles TUFiles;  | 

