diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index d50968bae19b75..0d08bf8e0a1ae2 100644 --- a/clang-tools-extra/clangd/SourceCode.cpp +++ b/clang-tools-extra/clangd/SourceCode.cpp @@ -564,7 +564,7 @@ format::FormatStyle getFormatStyleForFile(llvm::StringRef File, if (!Style) { log("getStyle() failed for file {0}: {1}. Fallback is LLVM style.", File, Style.takeError()); - Style = format::getLLVMStyle(); + return format::getLLVMStyle(); } return *Style; }