cppcheckdata.py: read more data from dumps
This commit is contained in:
parent
c03d32b429
commit
2730b16326
|
@ -447,21 +447,43 @@ class ValueFlow:
|
|||
Attributes:
|
||||
intvalue integer value
|
||||
tokvalue token value
|
||||
floatvalue float value
|
||||
containerSize container size
|
||||
condition condition where this Value comes from
|
||||
valueKind 'known' or 'possible'
|
||||
inconclusive Is value inconclusive?
|
||||
"""
|
||||
|
||||
intvalue = None
|
||||
tokvalue = None
|
||||
floatvalue = None
|
||||
containerSize = None
|
||||
condition = None
|
||||
valueKind = None
|
||||
inconclusive = False
|
||||
|
||||
def isKnown(self):
|
||||
return self.valueKind and self.valueKind == 'known'
|
||||
|
||||
def isPossible(self):
|
||||
return self.valueKind and self.valueKind == 'possible'
|
||||
|
||||
def __init__(self, element):
|
||||
self.intvalue = element.get('intvalue')
|
||||
if self.intvalue:
|
||||
self.intvalue = int(self.intvalue)
|
||||
self.tokvalue = element.get('tokvalue')
|
||||
self.floatvalue = element.get('floatvalue')
|
||||
self.containerSize = element.get('container-size')
|
||||
self.condition = element.get('condition-line')
|
||||
if self.condition:
|
||||
self.condition = int(self.condition)
|
||||
if element.get('known'):
|
||||
valueKind = 'known'
|
||||
elif element.get('possible'):
|
||||
valueKind = 'possible'
|
||||
if element.get('inconclusive'):
|
||||
inconclusive = 'known'
|
||||
|
||||
def __init__(self, element):
|
||||
self.Id = element.get('id')
|
||||
|
|
Loading…
Reference in New Issue