[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.
Hal Finkel via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 26 16:21:47 PDT 2016
hfinkel added a comment.
In https://reviews.llvm.org/D25403#580444, @jlebar wrote:
> //Let "CE" mean "constexpr-evaluatable". //
>
> libc++ attempts to be backwards-compatible with old versions of clang, right?
Yea, we'd need to ifdef the test for older versions of Clang. I've just summarized my overall proposal in a previous comment.
> 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