From 577ab1c2acee35dbd2540ecd248bd9e70cb7cded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 17 Jul 2015 15:22:24 +0200 Subject: [PATCH] ValueFlow: result of ? is not 'known' --- lib/valueflow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index ba2fadd0d..6cefa31a2 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -367,6 +367,9 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value) ValueFlow::Value v(value); v.conditional = true; + if (v.valueKind == ValueFlow::Value::Known) + v.valueKind = ValueFlow::Value::Possible; + if (!variables.empty()) v.varId = *(variables.begin());