possible future "data loss" warnings, and b) makes it intensely
obvious to the user what the impl of these functions do in a
ambiguity error.
llvm-svn: 64724
Now no candidates are printed because the 'notes' are in a system header. :(
#include <tgmath-sofar.h>
double foo2(short *x) {
return acos(x);
}
t.c:10:10: error: no matching function for call to '__tg_acos'; candidates are:
return acos(x);
^~~~
1 diagnostic generated.
llvm-svn: 64722
produces really horrible diagnostics when overload ambiguities
happen:
t.c:10:10: error: call to '__tg_acos' is ambiguous; candidates are:
return acos(x);
^~~~
In file included from t.c:1:
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function
__TG_RC_1(x, acos, cacos)
^
A possible fix is to just not use macros for this, which I'll probably go for,
but it would be nice to emit the type at the call, so we know what we asked for!
llvm-svn: 64720
a target.
Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.
On linux/32, set intptr_t to int, instead of long. This fixes PR3563.
llvm-svn: 64495
_GCC_LIMITS_H_ is defined, when __GNUC__ is defined.
Also, we need to stay away from possible conflicts with header guards.
We should use CLANG_ to prefix all header guards.
llvm-svn: 64408
long instead of int. This is because system heaers like to redefine
typedefs and that is an error if they don't exactly match. Use long
for intptr_t on all systems where long is the right size.
llvm-svn: 63984
don't typecast CHAR_MIN to char, this makes it not a PP constant
and gives it the wrong unpromoted type. Thanks to Sebastian for
pointing this out!
llvm-svn: 63980