Skip to content

Commit 577ab1c

Browse files
committed
ValueFlow: result of ? is not 'known'
1 parent 61cf224 commit 577ab1c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/valueflow.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value)
367367
ValueFlow::Value v(value);
368368
v.conditional = true;
369369

370+
if (v.valueKind == ValueFlow::Value::Known)
371+
v.valueKind = ValueFlow::Value::Possible;
372+
370373
if (!variables.empty())
371374
v.varId = *(variables.begin());
372375

0 commit comments

Comments
 (0)