[clang] 5bcc66d - VisitIfStmt: Prune a redundant condition.

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 04:10:48 PDT 2024


Author: NAKAMURA Takumi
Date: 2024-10-17T20:04:00+09:00
New Revision: 5bcc66dc009893c55aefdcd16a0ca2dad315481b

URL: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b
DIFF: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b.diff

LOG: VisitIfStmt: Prune a redundant condition.

`S->isConsteval()` is evaluated at the top of this method.
Likely mis-merging in #75425

Added: 
    

Modified: 
    clang/lib/CodeGen/CoverageMappingGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 07015834bc84f3..577a0f571e16ea 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -2066,7 +2066,7 @@ struct CounterCoverageMappingBuilder
       GapRegionCounter = OutCount;
     }
 
-    if (!S->isConsteval() && !llvm::EnableSingleByteCoverage)
+    if (!llvm::EnableSingleByteCoverage)
       // Create Branch Region around condition.
       createBranchRegion(S->getCond(), ThenCount,
                          subtractCounters(ParentCount, ThenCount));


        


More information about the cfe-commits mailing list