[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 16:19:25 PDT 2016


jlebar added a comment.

//Let "CE" mean "constexpr-evaluatable". //

libc++ attempts to be backwards-compatible with old versions of clang, right?  Old versions of clang are going to fail, since the builtin will not be CE.  Is the idea to write a test that checks that, if __builtin_isfinite is CE, then __libcpp_isfinite is also CE?  AIUI you can only test CE-ness by detecting a compile failure failure.

So is the idea that we would have a shell script that tries to compile a file, checking for CE-ness of the builtins, and,  if and only if that succeeds, then checks for CE-ness of __libcpp_isfinite?


https://reviews.llvm.org/D25403





More information about the cfe-commits mailing list