[PATCH] [libcxx] Consolidate new/delete replacement in tests and disable it when using sanitizers.

Eric Fiselier eric at efcs.ca
Sun Dec 7 20:46:04 PST 2014


================
Comment at: test/localization/locale.stdcvt/codecvt_utf16.pass.cpp:38-42
@@ -37,7 @@
-{
-    if (p)
-    {
-        --outstanding_news;
-        std::free(p);
-    }
-}
----------------
I'm not sure why it checks that `p` is not null. I added an assertion and it never fired. Should `count_new.hpp` also assert deleted pointers are non-null? Obviously passing a nullptr to delete is legal but I'm not sure why we would be doing that.

http://reviews.llvm.org/D6562






More information about the cfe-commits mailing list