Skip to content

Commit ec301b2

Browse files
committed
cppcheckdata.py: fixed Value::tokvalue
1 parent 7199dde commit ec301b2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

addons/cppcheckdata.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ def setId(self, IdMap):
383383
self.impossible_values.append(v)
384384
else:
385385
self.values.append(v)
386+
v.setId(IdMap)
386387
self.typeScope = IdMap[self.typeScopeId]
387388
self.astParent = IdMap[self.astParentId]
388389
self.astOperand1 = IdMap[self.astOperand1Id]
@@ -688,7 +689,7 @@ def __init__(self, element):
688689
self.intvalue = element.get('intvalue')
689690
if self.intvalue:
690691
self.intvalue = int(self.intvalue)
691-
self.tokvalue = element.get('tokvalue')
692+
self._tokvalueId = element.get('tokvalue')
692693
self.floatvalue = element.get('floatvalue')
693694
self.containerSize = element.get('container-size')
694695
self.condition = element.get('condition-line')
@@ -703,6 +704,9 @@ def __init__(self, element):
703704
if element.get('inconclusive'):
704705
self.inconclusive = True
705706

707+
def setId(self, IdMap):
708+
self.tokvalue = IdMap.get(self._tokvalueId)
709+
706710
def __repr__(self):
707711
attrs = ["intvalue", "tokvalue", "floatvalue", "containerSize",
708712
"condition", "valueKind", "inconclusive"]

0 commit comments

Comments
 (0)