Skip to content

Commit a361f01

Browse files
committed
More CheckLeakAutoVar debug output
1 parent 34b5e0c commit a361f01

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

lib/checkleakautovar.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,20 @@ void VarInfo::print()
4949
if (use != possibleUsage.end())
5050
strusage = use->second;
5151

52-
std::cout << "alloctype='" << it->second.type << "' "
53-
<< "possibleUsage='" << strusage << "'" << std::endl;
52+
std::string status;
53+
switch (it->second.status) {
54+
case DEALLOC: status = "dealloc"; break;
55+
case ALLOC: status = "alloc"; break;
56+
case NOALLOC: status = "noalloc"; break;
57+
default: status = "?"; break;
58+
};
59+
60+
std::cout << "status=" << status << " "
61+
<< "alloctype='" << it->second.type << "' "
62+
<< "possibleUsage='" << strusage << "' "
63+
<< "conditionalAlloc=" << (conditionalAlloc.find(it->first) != conditionalAlloc.end() ? "yes" : "no") << " "
64+
<< "referenced=" << (referenced.find(it->first) != referenced.end() ? "yes" : "no") << " "
65+
<< std::endl;
5466
}
5567
}
5668

0 commit comments

Comments
 (0)