[PATCH] D19835: Tolerate incorrect return type for 'isinf' and 'isnan' in tests.
Jonathan Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 14:18:53 PDT 2016
jroelofs added a subscriber: jroelofs.
jroelofs added a comment.
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);
}
http://reviews.llvm.org/D19835
More information about the cfe-commits
mailing list