diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py index 003bc50ab..7f6f9fb1e 100755 --- a/addons/cppcheckdata.py +++ b/addons/cppcheckdata.py @@ -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' diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 8b65b64f2..379b6c71c 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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 << " " << std::endl;