[PATCH] D22557: [libcxx] Diagnose invalid memory order arguments in <atomic>. Fixes PR21179.

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 16:31:01 PDT 2016


jfb added inline comments.

================
Comment at: test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp:87
@@ +86,3 @@
+        x.compare_exchange_weak(val1, val2, std::memory_order_release);
+    }
+    {
----------------
That's not quite true: the failure ordering is auto-deduced from the success one, but it's not necessarily the same! The spec says all success is valid, so the auto-mapping has to ensure that all failures are also valid. That's what I'm trying to have you test: that the auto-mapping is always valid as well.


https://reviews.llvm.org/D22557





More information about the cfe-commits mailing list