[PATCH] D126524: [CompilerInstance] Fix weird condition on `createCodeCompletionConsumer`
Yuki Okushi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 27 05:00:20 PDT 2022
JohnTitor updated this revision to Diff 432527.
JohnTitor added a comment.
Fix the indention
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126524/new/
https://reviews.llvm.org/D126524
Files:
clang/lib/Frontend/CompilerInstance.cpp
Index: clang/lib/Frontend/CompilerInstance.cpp
===================================================================
--- clang/lib/Frontend/CompilerInstance.cpp
+++ clang/lib/Frontend/CompilerInstance.cpp
@@ -710,13 +710,10 @@
void CompilerInstance::createCodeCompletionConsumer() {
const ParsedSourceLocation &Loc = getFrontendOpts().CodeCompletionAt;
if (!CompletionConsumer) {
- setCodeCompletionConsumer(
- createCodeCompletionConsumer(getPreprocessor(),
- Loc.FileName, Loc.Line, Loc.Column,
- getFrontendOpts().CodeCompleteOpts,
- llvm::outs()));
- if (!CompletionConsumer)
- return;
+ setCodeCompletionConsumer(createCodeCompletionConsumer(
+ getPreprocessor(), Loc.FileName, Loc.Line, Loc.Column,
+ getFrontendOpts().CodeCompleteOpts, llvm::outs()));
+ return;
} else if (EnableCodeCompletion(getPreprocessor(), Loc.FileName,
Loc.Line, Loc.Column)) {
setCodeCompletionConsumer(nullptr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126524.432527.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220527/fedbd916/attachment.bin>
More information about the cfe-commits
mailing list