dump: Add platform info and valueType info
This commit is contained in:
parent
1b1099201c
commit
e71b428740
|
@ -143,6 +143,15 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin
|
||||||
if (fdump.is_open()) {
|
if (fdump.is_open()) {
|
||||||
fdump << "<?xml version=\"1.0\"?>" << std::endl;
|
fdump << "<?xml version=\"1.0\"?>" << std::endl;
|
||||||
fdump << "<dumps>" << std::endl;
|
fdump << "<dumps>" << std::endl;
|
||||||
|
fdump << " <platform"
|
||||||
|
<< " name=\"" << _settings.platformString() << '\"'
|
||||||
|
<< " char bit=\"" << _settings.char_bit << '\"'
|
||||||
|
<< " short_bit=\"" << _settings.short_bit << '\"'
|
||||||
|
<< " int_bit=\"" << _settings.int_bit << '\"'
|
||||||
|
<< " long_bit=\"" << _settings.long_bit << '\"'
|
||||||
|
<< " long_long_bit=\"" << _settings.long_long_bit << '\"'
|
||||||
|
<< " pointer_bit=\"" << (_settings.sizeof_pointer * _settings.char_bit) << '\"'
|
||||||
|
<< "/>\n";
|
||||||
fdump << " <rawtokens>" << std::endl;
|
fdump << " <rawtokens>" << std::endl;
|
||||||
for (unsigned int i = 0; i < files.size(); ++i)
|
for (unsigned int i = 0; i < files.size(); ++i)
|
||||||
fdump << " <file index=\"" << i << "\" name=\"" << ErrorLogger::toxml(files[i]) << "\"/>" << std::endl;
|
fdump << " <file index=\"" << i << "\" name=\"" << ErrorLogger::toxml(files[i]) << "\"/>" << std::endl;
|
||||||
|
|
|
@ -3919,6 +3919,13 @@ void Tokenizer::dump(std::ostream &out) const
|
||||||
out << " astOperand1=\"" << tok->astOperand1() << '\"';
|
out << " astOperand1=\"" << tok->astOperand1() << '\"';
|
||||||
if (tok->astOperand2())
|
if (tok->astOperand2())
|
||||||
out << " astOperand2=\"" << tok->astOperand2() << '\"';
|
out << " astOperand2=\"" << tok->astOperand2() << '\"';
|
||||||
|
if (tok->valueType()) {
|
||||||
|
std::string s = tok->valueType()->str();
|
||||||
|
std::string::size_type pos = s.find("container(");
|
||||||
|
if (pos != std::string::npos)
|
||||||
|
s.erase(pos+9, s.find(")",pos)-pos-8);
|
||||||
|
out << " valueType=\"" << s << '\"';
|
||||||
|
}
|
||||||
out << "/>" << std::endl;
|
out << "/>" << std::endl;
|
||||||
}
|
}
|
||||||
out << " </tokenlist>" << std::endl;
|
out << " </tokenlist>" << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue