[llvm-branch-commits] [clang] [llvm] [Coverage][Single] Enable Branch coverage for IfStmt (PR #113111)

Jessica Paquette via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Dec 22 20:38:41 PST 2024


================
@@ -864,8 +864,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) {
     // If the skipped block has no labels in it, just emit the executed block.
     // This avoids emitting dead code and simplifies the CFG substantially.
     if (S.isConstexpr() || !ContainsLabel(Skipped)) {
-      if (CondConstant)
-        incrementProfileCounter(&S);
+      incrementProfileCounter(!CondConstant, &S, true);
----------------
ornata wrote:

add comment for bool parameter for readability?

e.g. `/*varname=*/true`

https://github.com/llvm/llvm-project/pull/113111


More information about the llvm-branch-commits mailing list