hfinkel added a comment. In https://reviews.llvm.org/D25403#580432, @jlebar wrote:
> In https://reviews.llvm.org/D25403#580422, @hfinkel wrote: > > > Okay. Why not fix the Clang builtins so that they're evaluatable for > > constant inputs in a constexpr context? Then we can do this and test the > > change. > > > I am not sure how much value we would derive from testing specifically that > these functions are constexpr-evaluatable? The thing we actually care about > is whether clang can wrap the libc++ `<complex>` header in cuda mode, and > that could break by removing these constexprs, or by adding a new function > used in `<complex>` and not marking it constexpr, or in any number of other > ways. > > Conversely, if `<complex>` stopped relying on these functions, we wouldn't > care if they stopped being constexpr. I'm not sure about that. It seems like a useful feature for the builtins to have. Logically speaking, they should be constexpr. > In addition, if I understand you correctly, we wouldn't be able to test all > of the functions here, only the ones that call builtins. What do you mean? > We have an e2e test for this in the test-suite -- it's currently only enabled > for libstdc++. We haven't yet hooked this up to send out emails when it > fails, but if you wanted to block this change on that, I'd totally be > onboard. We also similarly have tests in the test-suite for <cmath> and > <math.h>, which have similar failure modes to <complex>. https://reviews.llvm.org/D25403 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits