Skip to content

Commit afc8481

Browse files
committed
CGF.markStmtMaybeUsed for binop
1 parent 03cfce1 commit afc8481

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4970,7 +4970,8 @@ Value *ScalarExprEmitter::VisitBinLAnd(const BinaryOperator *E) {
49704970
CGF.incrementProfileCounter(E->getRHS());
49714971
CGF.EmitBranch(FBlock);
49724972
CGF.EmitBlock(FBlock);
4973-
}
4973+
} else
4974+
CGF.markStmtMaybeUsed(E->getRHS());
49744975

49754976
CGF.MCDCLogOpStack.pop_back();
49764977
// If the top of the logical operator nest, update the MCDC bitmap.
@@ -5112,7 +5113,8 @@ Value *ScalarExprEmitter::VisitBinLOr(const BinaryOperator *E) {
51125113
CGF.incrementProfileCounter(E->getRHS());
51135114
CGF.EmitBranch(FBlock);
51145115
CGF.EmitBlock(FBlock);
5115-
}
5116+
} else
5117+
CGF.markStmtMaybeUsed(E->getRHS());
51165118

51175119
CGF.MCDCLogOpStack.pop_back();
51185120
// If the top of the logical operator nest, update the MCDC bitmap.

0 commit comments

Comments
 (0)