> When i checked it was being reported at the ending curly brace of the 
function.

  What is the callback that triggers it?

  If we skip the first time the use-after-free happens, we report the error in 
the destructor. However, that destructor is called when processing the second 
delete, so if we report on the first occurrence of use-after-free, the location 
should be before we called the destructor, not after.

  Can you investigate why that is not the case?

  I assume we talk about this example:

  void testDoubleDeleteClassInstance() {
    DerefClass *foo = new DerefClass();
    delete foo;
    delete foo; // FIXME: We should ideally report warning here instead of 
inside the destructor.
  }

http://llvm-reviews.chandlerc.com/D1594
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to