[PATCH] D119124: Removing unnecessary condition

harish via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 20:41:39 PST 2022


harishch4 updated this revision to Diff 406691.
harishch4 added a comment.

- Remove unnecessary condition
- missed return


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119124/new/

https://reviews.llvm.org/D119124

Files:
  clang/lib/Frontend/CompilerInstance.cpp


Index: clang/lib/Frontend/CompilerInstance.cpp
===================================================================
--- clang/lib/Frontend/CompilerInstance.cpp
+++ 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119124.406691.patch
Type: text/x-patch
Size: 646 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220208/db9e6c87/attachment.bin>


More information about the llvm-commits mailing list