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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to