[PATCH] D40144: Implement `std::launder`

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 16 12:07:18 PST 2017


Quuxplusone added inline comments.


================
Comment at: test/std/language.support/support.dynamic/ptr.launder/launder.fail.cpp:26
+    int *p = nullptr;
+    std::launder(p);  // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}}
+}
----------------
Would one also expect a decent static analyzer to warn that you are laundering a null pointer? (and should we care?)


https://reviews.llvm.org/D40144





More information about the cfe-commits mailing list