]> granicus.if.org Git - clang/commit
start converting over to attr(overloadable). Unfortunately, this
authorChris Lattner <sabre@nondot.org>
Tue, 17 Feb 2009 02:14:31 +0000 (02:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Feb 2009 02:14:31 +0000 (02:14 +0000)
commit5f3d0aef115e9a0b42701fc8957ad7d33e8db187
treed88d3b7ce079a76cfa90a934310d1db10d097f85
parent574aa40703ffb2fddad5b076cec1c2fc27f0b2d3
start converting over to attr(overloadable).  Unfortunately, this
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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64720 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/tgmath-sofar.h