EricWF added inline comments.
================ Comment at: include/new:274 +{ + return __launder(__p); +} ---------------- The call should probably be qualified to `_VSTD::__launder`. ================ Comment at: test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp:16 +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + ---------------- Why is this test unsupported with older compilers? The version of `std::launder` in this patch should work regardless of compiler support for `__builtin_launder`. Although, it's possible the compiler requirements were intended to avoid older clang versions without `[[nodiscard]]`. However, I don't think `clang-3.8` supports C++2a, so the condition seems redundant. ================ Comment at: test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp:28 + void *p = nullptr; + (void) std::launder(( void *) nullptr); // expected-error-re@new:* {{static_assert failed{{.*}} "can't launder cv-void"}} + (void) std::launder((const void *) nullptr); // expected-error-re@new:* {{static_assert failed{{.*}} "can't launder cv-void"}} ---------------- Alternatively you could de-duplicate the four identical checks into the single check: ``` // expected-error-re@new:* 4 {{static_assert failed{{.*}} "can't launder cv-void"}} ``` https://reviews.llvm.org/D40144 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits