cppcheck build dir; Fix several xml syntax errors in the analyzer info files

This commit is contained in:
Daniel Marjamäki 2021-08-04 21:39:13 +02:00
parent 735f716603
commit ad478914f7
2 changed files with 5 additions and 5 deletions

View File

@ -2934,7 +2934,7 @@ std::string CheckClass::MyFileInfo::toString() const
{
std::string ret;
for (const MyFileInfo::NameLoc &nameLoc: classDefinitions) {
ret += "<class name=\"" + nameLoc.className +
ret += "<class name=\"" + ErrorLogger::toxml(nameLoc.className) +
"\" file=\"" + ErrorLogger::toxml(nameLoc.fileName) +
"\" line=\"" + std::to_string(nameLoc.lineNumber) +
"\" col=\"" + std::to_string(nameLoc.column) +

View File

@ -92,7 +92,7 @@ std::string CTU::FileInfo::FunctionCall::toXmlString() const
std::ostringstream out;
out << "<function-call"
<< toBaseXmlString()
<< " " << ATTR_CALL_ARGEXPR << "=\"" << callArgumentExpression << "\""
<< " " << ATTR_CALL_ARGEXPR << "=\"" << ErrorLogger::toxml(callArgumentExpression) << "\""
<< " " << ATTR_CALL_ARGVALUETYPE << "=\"" << static_cast<int>(callValueType) << "\""
<< " " << ATTR_CALL_ARGVALUE << "=\"" << callArgValue << "\"";
if (warning)
@ -103,10 +103,10 @@ std::string CTU::FileInfo::FunctionCall::toXmlString() const
out << ">\n";
for (const ErrorMessage::FileLocation &loc : callValuePath)
out << " <path"
<< " " << ATTR_LOC_FILENAME << "=\"" << loc.getfile() << "\""
<< " " << ATTR_LOC_FILENAME << "=\"" << ErrorLogger::toxml(loc.getfile()) << "\""
<< " " << ATTR_LOC_LINENR << "=\"" << loc.line << "\""
<< " " << ATTR_LOC_COLUMN << "=\"" << loc.column << "\""
<< " " << ATTR_INFO << "=\"" << loc.getinfo() << "\"/>\n";
<< " " << ATTR_INFO << "=\"" << ErrorLogger::toxml(loc.getinfo()) << "\"/>\n";
out << "</function-call>";
}
return out.str();
@ -130,7 +130,7 @@ std::string CTU::FileInfo::UnsafeUsage::toString() const
<< " " << ATTR_MY_ID << "=\"" << myId << '\"'
<< " " << ATTR_MY_ARGNR << "=\"" << myArgNr << '\"'
<< " " << ATTR_MY_ARGNAME << "=\"" << myArgumentName << '\"'
<< " " << ATTR_LOC_FILENAME << "=\"" << location.fileName << '\"'
<< " " << ATTR_LOC_FILENAME << "=\"" << ErrorLogger::toxml(location.fileName) << '\"'
<< " " << ATTR_LOC_LINENR << "=\"" << location.lineNumber << '\"'
<< " " << ATTR_LOC_COLUMN << "=\"" << location.column << '\"'
<< " " << ATTR_VALUE << "=\"" << value << "\""