dump: fix xml in TokenAndName element

This commit is contained in:
Daniel Marjamäki 2023-04-16 18:17:05 +02:00
parent 9ad26f51e8
commit 785f32465f
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ TemplateSimplifier::TokenAndName::~TokenAndName()
}
std::string TemplateSimplifier::TokenAndName::dump(const std::vector<std::string>& fileNames) const {
std::string ret = " <TokenAndName name=\"" + mName + "\" file=\"" + ErrorLogger::toxml(fileNames.at(mToken->fileIndex())) + "\" line=\"" + std::to_string(mToken->linenr()) + "\">\n";
std::string ret = " <TokenAndName name=\"" + ErrorLogger::toxml(mName) + "\" file=\"" + ErrorLogger::toxml(fileNames.at(mToken->fileIndex())) + "\" line=\"" + std::to_string(mToken->linenr()) + "\">\n";
for (const Token* tok = mToken; tok && !Token::Match(tok, "[;{}]"); tok = tok->next())
ret += " <template-token str=\"" + ErrorLogger::toxml(tok->str()) + "\"/>\n";
return ret + " </TokenAndName>\n";