[cfe-commits] r145575 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/misc-ps-region-store.cpp

Jonathan Sauer jonathan.sauer at gmx.de
Sun Dec 11 00:15:17 PST 2011


Hello,

> Hi, Ted. Just wanted to note that it's technically legal for 'this' to be null if the method is non-virtual, which I'm sure you know already. Maybe someday we can make this a setting?

I'm not so sure about that. After all, when calling the method as in "obj->method()", you dereference the pointer. And
dereferencing a NULL pointer results in undefined behaviour.

C.f. this thread: <http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/348cc1eeef92033d>


Jonathan





More information about the cfe-commits mailing list