We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6f729d commit a7544b6Copy full SHA for a7544b6
clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -655,6 +655,9 @@ class TransferVisitor : public ConstStmtVisitor<TransferVisitor> {
655
if (TrueLoc == FalseLoc && TrueLoc != nullptr)
656
Env.setStorageLocation(*S, *TrueLoc);
657
} else if (!S->getType()->isRecordType()) {
658
+ // The conditional operator can evaluate to either of the values of the
659
+ // two branches. To model this, join these two values together to yield
660
+ // the result of the conditional operator.
661
if (Value *Val = Environment::joinValues(
662
S->getType(), TrueEnv->getValue(*S->getTrueExpr()), *TrueEnv,
663
FalseEnv->getValue(*S->getFalseExpr()), *FalseEnv, Env, Model))
0 commit comments