diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -715,8 +715,7 @@ Loc.FileName, Loc.Line, Loc.Column, getFrontendOpts().CodeCompleteOpts, llvm::outs())); - if (!CompletionConsumer) - return; + return; } else if (EnableCodeCompletion(getPreprocessor(), Loc.FileName, Loc.Line, Loc.Column)) { setCodeCompletionConsumer(nullptr);