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 a7544b6 commit 86a18d3Copy full SHA for 86a18d3
clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -645,8 +645,12 @@ class TransferVisitor : public ConstStmtVisitor<TransferVisitor> {
645
const Environment *TrueEnv = StmtToEnv.getEnvironment(*S->getTrueExpr());
646
const Environment *FalseEnv = StmtToEnv.getEnvironment(*S->getFalseExpr());
647
648
- if (TrueEnv == nullptr || FalseEnv == nullptr)
+ if (TrueEnv == nullptr || FalseEnv == nullptr) {
649
+ // We should always have an environment as we should visit the true /
650
+ // false branches before the conditional operator.
651
+ assert(false);
652
return;
653
+ }
654
655
if (S->isGLValue()) {
656
StorageLocation *TrueLoc = TrueEnv->getStorageLocation(*S->getTrueExpr());
0 commit comments