Skip to content

Commit 9e74aa5

Browse files
Update vf_settokenvalue.cpp
1 parent fe2254b commit 9e74aa5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/vf_settokenvalue.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ namespace ValueFlow
407407
}
408408

409409
else if (parent->str() == ":" && Token::simpleMatch(parent->astParent(), "?")) {
410+
const std::string condStr(tok == parent->astOperand1() ? "true" : "false");
411+
value.errorPath.emplace_back(parent->astParent()->astOperand1(), "Assuming condition '" + parent->astParent()->astOperand1()->expressionString() + "' is " + condStr);
410412
setTokenValue(parent,std::move(value),settings);
411413
}
412414

0 commit comments

Comments
 (0)