MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / toXmlString

Method toXmlString

lib/ctu.cpp:98–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98std::string CTU::FileInfo::FunctionCall::toXmlString() const
99{
100 std::ostringstream out;
101 out << "<function-call"
102 << toBaseXmlString()
103 << " " << ATTR_CALL_ARGEXPR << "=\"" << ErrorLogger::toxml(callArgumentExpression) << "\""
104 << " " << ATTR_CALL_ARGVALUETYPE << "=\"" << static_cast<int>(callValueType) << "\""
105 << " " << ATTR_CALL_ARGVALUE << "=\"" << callArgValue.value << "\""
106 << " " << ATTR_CALL_UNKNOWN_FUNCTION_RETURN << "=\"" << static_cast<int>(callArgValue.unknownFunctionReturn) << "\"";
107 if (warning)
108 out << " " << ATTR_WARNING << "=\"true\"";
109 if (callValuePath.empty())
110 out << "/>";
111 else {
112 out << ">\n";
113 for (const ErrorMessage::FileLocation &loc : callValuePath)
114 out << " <path"
115 << " " << ATTR_LOC_FILENAME << "=\"" << ErrorLogger::toxml(loc.getfile(false)) << "\""
116 << " " << ATTR_LOC_LINENR << "=\"" << loc.line << "\""
117 << " " << ATTR_LOC_COLUMN << "=\"" << loc.column << "\""
118 << " " << ATTR_INFO << "=\"" << ErrorLogger::toxml(loc.getinfo()) << "\"/>\n";
119 out << "</function-call>";
120 }
121 return out.str();
122}
123
124std::string CTU::FileInfo::NestedCall::toXmlString() const
125{

Callers 1

toStringMethod · 0.80

Calls 3

getfileMethod · 0.80
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected