[libcxxabi] r200864 - Fix PR17222 - catching derived classes from thrown null pointer. Adds tests, too
Howard Hinnant
howard.hinnant at gmail.com
Wed Feb 5 15:31:32 PST 2014
On Feb 5, 2014, at 1:19 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
> - adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
> + if (adjustedPtr != NULL)
> + adjustedPtr = const_cast<void*>(info.dst_ptr_leading_to_static_ptr);
> return true;
The only thing I can possibly find to whine about is the use of NULL instead of nullptr. The use of NULL is harmless here, so this comment is purely stylistic.
And now that I look a little deeper, the use of NULL (and probably 0) is all over libc++ and libc++abi. Instead of fixing this one instance, a good project for someone eager to get their feet wet would be to survey both libs entirely, subbing in and testing (both C++03, where nullptr is emulated, and C++11) nullptr everywhere.
Howard
More information about the cfe-commits
mailing list