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