@@ -5725,6 +5725,8 @@ void Tokenizer::dump(std::ostream &out) const
57255725 // The idea is not that this will be readable for humans. It's a
57265726 // data dump that 3rd party tools could load and get useful info from.
57275727
5728+ std::set<const Library::Container*> containers;
5729+
57285730 // tokens..
57295731 out << " <tokenlist>" << std::endl;
57305732 for (const Token *tok = list.front (); tok; tok = tok->next ()) {
@@ -5804,6 +5806,7 @@ void Tokenizer::dump(std::ostream &out) const
58045806 const std::string vt = tok->valueType ()->dump ();
58055807 if (!vt.empty ())
58065808 out << ' ' << vt;
5809+ containers.insert (tok->valueType ()->container );
58075810 }
58085811 if (!tok->varId () && tok->scope ()->isExecutable () && Token::Match (tok, " %name% (" )) {
58095812 if (mSettings ->library .isnoreturn (tok))
@@ -5815,6 +5818,18 @@ void Tokenizer::dump(std::ostream &out) const
58155818 out << " </tokenlist>" << std::endl;
58165819
58175820 mSymbolDatabase ->printXml (out);
5821+
5822+ containers.erase (nullptr );
5823+ if (!containers.empty ()) {
5824+ out << " <containers>\n " ;
5825+ for (const Library::Container* c: containers) {
5826+ out << " <container id=\" " << c << " \" array-like-index-op=\" "
5827+ << (c->arrayLike_indexOp ? " true" : " false" ) << " \" "
5828+ << " std-string-like=\" " << (c->stdStringLike ? " true" : " false" ) << " \" />\n " ;
5829+ }
5830+ out << " </containers>\n " ;
5831+ }
5832+
58185833 if (list.front ())
58195834 list.front ()->printValueFlow (true , out);
58205835
0 commit comments