From e65d6d3c67b88fa7d3616d69f9d06e2002fa7ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 16 May 2017 19:43:55 +0200 Subject: [PATCH] ValueFlow: inherit Value::callstack in calculations --- lib/valueflow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 1470fffc5..eba36f0a3 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -365,6 +365,7 @@ static void setTokenValue(Token* tok, const ValueFlow::Value &value, const Setti result.inconclusive = value1->inconclusive | value2->inconclusive; result.varId = (value1->varId != 0U) ? value1->varId : value2->varId; result.varvalue = (result.varId == value1->varId) ? value1->varvalue : value2->varvalue; + result.callstack = (value1->callstack.empty() ? value2 : value1)->callstack; if (value1->valueKind == value2->valueKind) result.valueKind = value1->valueKind; const float floatValue1 = value1->isIntValue() ? value1->intvalue : value1->floatValue;