dumpfile: remove redundant Variable attributes isArgument and isLocal. Add isVolatile.

This commit is contained in:
Daniel Marjamäki 2021-11-19 17:21:05 +01:00
parent 22eeeed17a
commit 10109a5ef7
2 changed files with 4 additions and 5 deletions

View File

@ -608,13 +608,13 @@ class Variable:
self.access = element.get('access')
self.scopeId = element.get('scope')
self.scope = None
self.isArgument = element.get('isArgument') == 'true'
self.isArgument = (self.access and self.access == 'Argument')
self.isArray = element.get('isArray') == 'true'
self.isClass = element.get('isClass') == 'true'
self.isConst = element.get('isConst') == 'true'
self.isGlobal = element.get('access') == 'Global'
self.isGlobal = (self.access and self.access == 'Global')
self.isExtern = element.get('isExtern') == 'true'
self.isLocal = element.get('isLocal') == 'true'
self.isLocal = (self.access and self.access == 'Local')
self.isPointer = element.get('isPointer') == 'true'
self.isReference = element.get('isReference') == 'true'
self.isStatic = element.get('isStatic') == 'true'

View File

@ -3800,15 +3800,14 @@ void SymbolDatabase::printXml(std::ostream &out) const
out << " scope=\"" << var->scope() << '\"';
if (var->valueType())
out << " constness=\"" << var->valueType()->constness << '\"';
out << " isArgument=\"" << var->isArgument() << '\"';
out << " isArray=\"" << var->isArray() << '\"';
out << " isClass=\"" << var->isClass() << '\"';
out << " isConst=\"" << var->isConst() << '\"';
out << " isExtern=\"" << var->isExtern() << '\"';
out << " isLocal=\"" << var->isLocal() << '\"';
out << " isPointer=\"" << var->isPointer() << '\"';
out << " isReference=\"" << var->isReference() << '\"';
out << " isStatic=\"" << var->isStatic() << '\"';
out << " isVolatile=\"" << var->isVolatile() << '\"';
out << "/>" << std::endl;
}
out << " </variables>" << std::endl;