From 6fe20a44fd3fc95198b3b38dc1080266be4ef004 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Sun, 3 May 2020 22:13:49 +0200 Subject: [PATCH] [clangd] Fix yet-another gratuitous llvm::Error crash --- clang-tools-extra/clangd/SourceCode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/SourceCode.cpp b/clang-tools-extra/clangd/SourceCode.cpp index d50968b..0d08bf8 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; } -- 2.7.4