diff --git a/lib/token.cpp b/lib/token.cpp index 1fb0f930f..ec5f21641 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -1311,8 +1311,11 @@ void Token::printValueFlow(bool xml, std::ostream &out) const else if (line != tok->linenr()) out << "Line " << tok->linenr() << std::endl; line = tok->linenr(); - if (!xml) - out << " " << tok->str() << ":{"; + if (!xml) { + out << " " << tok->str() << ' ' << (tok->values.front().isKnown() ? "= " : ": "); + if (tok->values.size() > 1U) + out << '{'; + } for (std::list::const_iterator it=tok->values.begin(); it!=tok->values.end(); ++it) { if (xml) { out << " intvalue << '\"'; if (it->condition) out << " condition-line=\"" << it->condition->linenr() << '\"'; + if (it->isKnown()) + out << " known=\"true\""; + else if (it->isPossible()) + out << " possible=\"true\""; out << "/>" << std::endl; } @@ -1336,8 +1343,10 @@ void Token::printValueFlow(bool xml, std::ostream &out) const } if (xml) out << " " << std::endl; + else if (tok->values.size() > 1U) + out << '}' << std::endl; else - out << "}" << std::endl; + out << std::endl; } if (xml) out << " " << std::endl;