EricWF 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); + } + { ---------------- jfb wrote: > 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. Right, but the auto-mapping is done once we have entered the `compare_exchange_weak` function, These diagnostics are triggered within the function signature. So even if we got the auto mapping wrong this test would not be able to diagnose it.
I agree we should be testing the auto-mapping, but I don't think this test is the right place to do it. https://reviews.llvm.org/D22557 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits