Skip to content
Snippets Groups Projects
Commit af8f7c43 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Dispose the memory allocated for the demangled id.

parent c11447f1
No related branches found
No related tags found
No related merge requests found
...@@ -51,9 +51,13 @@ bool ASTDump::preVisit(AST *ast) ...@@ -51,9 +51,13 @@ bool ASTDump::preVisit(AST *ast)
{ {
const char *id = typeid(*ast).name(); const char *id = typeid(*ast).name();
#ifdef Q_CC_GNU #ifdef Q_CC_GNU
id = abi::__cxa_demangle(id, 0, 0, 0); char *cppId = abi::__cxa_demangle(id, 0, 0, 0);
id = cppId;
#endif #endif
out << QByteArray(_depth, ' ') << id << endl; out << QByteArray(_depth, ' ') << id << endl;
#ifdef Q_CC_GNU
free(cppId);
#endif
++_depth; ++_depth;
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment