[PATCH] [StaticAnalyzer]Handle Destructor call generated by C++ delete expr
Karthik Bhat
kv.bhat at samsung.com
Sun Sep 22 23:24:32 PDT 2013
Hi Jordan,
I'm aware of the test case which you highlighted but had ignored it for now as i was able to observe same behavior in case of Automatic object Destruction. Consider a test case -
void testDoubleDeleteClassInstance() {
int* x = 0;
{
NoReturnDtor a[2];
}
clang_analyzer_eval(true); // no warn
}
The problem seems to be that in VisitCXXDestructor it is not able to conclude that the type is of form ArrayType.
If you are OK i would like to take this and double delete as a TODO post this checkin as i will need to debug more to find the root cause.
Implemented comment to drill down to the base element.
{F11424}
Thanks!
http://llvm-reviews.chandlerc.com/D1594
More information about the cfe-commits
mailing list