[libcxx] Diagnose invalid memory order arguments in <atomic>. Fixes PR21179.
Summary: This patch uses the __attribute__((enable_if)) hack suggested by @rsmith to diagnose invalid arguments when possible. In order to diagnose an invalid argument `m` to `f(m)` we provide an additional overload of `f` that is only enabled when `m` is invalid. When that function is enabled it uses __attribute__((unavailable)) to produce a diagnostic message. Reviewers: mclow.lists, rsmith, jfb, EricWF Subscribers: bcraig, jfb, rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D22557 llvm-svn: 276506
Loading
Please register or sign in to comment