| 96 | } |
| 97 | |
| 98 | std::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 | |
| 124 | std::string CTU::FileInfo::NestedCall::toXmlString() const |
| 125 | { |