[libcxx-commits] [PATCH] D122397: [libc++] Use __builtin_expect in _LIBCPP_ASSERT

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 24 11:57:47 PDT 2022


ldionne added a comment.

In D122397#3406135 <https://reviews.llvm.org/D122397#3406135>, @philnik wrote:

> I'm pretty sure it doesn't evaluate at compile-time. https://godbolt.org/z/8d7fh8nc7 clang specifically warns that side-effects will be discarded.

Yup, I just noticed that while implementing your suggestion too!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122397/new/

https://reviews.llvm.org/D122397



More information about the libcxx-commits mailing list