<p dir="ltr"></p>
<p dir="ltr">On Jul 22, 2016 4:45 PM, "Eric Fiselier" <<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br>
><br>
> EricWF added inline comments.<br>
><br>
> ================<br>
> Comment at: test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp:87<br>
> @@ +86,3 @@<br>
> +        x.compare_exchange_weak(val1, val2, std::memory_order_release);<br>
> +    }<br>
> +    {<br>
> ----------------<br>
> jfb wrote:<br>
> > 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.<br>
> 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.<br>
><br>
> I agree we should be testing the auto-mapping, but I don't think this test is the right place to do it.<br></p>
<p dir="ltr">Ah ok, that's good with me then. <br></p>
<p dir="ltr">><br>
> <a href="https://reviews.llvm.org/D22557">https://reviews.llvm.org/D22557</a><br>
><br>
><br>
></p>