EricWF added a comment. In http://reviews.llvm.org/D19835#419211, @jroelofs wrote:
> I think you could lean on the linker to cause the test to fail when the type > is wrong: > > bool isinf(double); > > typedef int (*expected_signature)(double); > > void assert_via_linker(decltype(isinf) blah); > void assert_via_linker(expected_signature blah) {} > > void foo() { > assert_via_linker(isinf); > } > > Alternatively `static_assert(std::is_same<decltype(isinf((double)0)), bool>::value);` :-P Testing the return type isn't the problem. The problem is telling LIT *when* we expect the test to fail using the `XFAIL` directive. The test will pass for: - non-linux systems - GLIBC >= 2.26 and C++ >= 11. The test will fail for: - GLIBC < 2.26 - GLIBC >= 2.26 and C++ < 11. Trying to encode that within 'XFAIL' is currently not possible and http://reviews.llvm.org/D19835 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits