[PATCH] D126524: [CompilerInstance] Fix weird condition on `createCodeCompletionConsumer`
Yuki Okushi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 27 22:59:34 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd3d3e2528e60: [CompilerInstance] Fix weird condition on `createCodeCompletionConsumer` (authored by JohnTitor).
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.432697.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220528/5e72a68d/attachment.bin>
More information about the cfe-commits
mailing list