More CheckLeakAutoVar debug output

This commit is contained in:
Daniel Marjamäki 2016-02-07 19:53:55 +01:00
parent 34b5e0ce99
commit a361f0192d
1 changed files with 14 additions and 2 deletions

View File

@ -49,8 +49,20 @@ void VarInfo::print()
if (use != possibleUsage.end())
strusage = use->second;
std::cout << "alloctype='" << it->second.type << "' "
<< "possibleUsage='" << strusage << "'" << std::endl;
std::string status;
switch (it->second.status) {
case DEALLOC: status = "dealloc"; break;
case ALLOC: status = "alloc"; break;
case NOALLOC: status = "noalloc"; break;
default: status = "?"; break;
};
std::cout << "status=" << status << " "
<< "alloctype='" << it->second.type << "' "
<< "possibleUsage='" << strusage << "' "
<< "conditionalAlloc=" << (conditionalAlloc.find(it->first) != conditionalAlloc.end() ? "yes" : "no") << " "
<< "referenced=" << (referenced.find(it->first) != referenced.end() ? "yes" : "no") << " "
<< std::endl;
}
}