Skip to content

Commit 6fe20a4

Browse files
committed
[clangd] Fix yet-another gratuitous llvm::Error crash
1 parent cb03892 commit 6fe20a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clangd/SourceCode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ format::FormatStyle getFormatStyleForFile(llvm::StringRef File,
564564
if (!Style) {
565565
log("getStyle() failed for file {0}: {1}. Fallback is LLVM style.", File,
566566
Style.takeError());
567-
Style = format::getLLVMStyle();
567+
return format::getLLVMStyle();
568568
}
569569
return *Style;
570570
}

0 commit comments

Comments
 (0)