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

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 13:36:38 PDT 2016


EricWF added a reviewer: jfb.
EricWF marked an inline comment as done.
EricWF added a comment.

Address inline comments from @jfb and add him as a reviewer.


================
Comment at: test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp:86
@@ +85,3 @@
+        // does not generate any diagnostics.
+        x.compare_exchange_weak(val1, val2, std::memory_order_release);
+    }
----------------
jfb wrote:
> Could you do the other 5 (same below).
I could, but we only check the two argument version of the overload, so I *know* the other orderings will have the same result. I think the one test is sufficient because it will fail the second we start testing the one argument version.

Do you still want the additional tests?


https://reviews.llvm.org/D22557





More information about the cfe-commits mailing list