summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2015-10-12 19:57:04 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2015-10-12 19:57:04 +0000
commitef378def97da93bae9e3e76eead6f81b3bfb1806 (patch)
treeb5c7658ca18aeab9c1ed48d2602885109779bfc7 /lib/Driver/Tools.cpp
parent7792ebc3c8d379d2346494c241dfc4eb4ef1c363 (diff)
downloadclang-ef378def97da93bae9e3e76eead6f81b3bfb1806.tar.gz
[Sema] Make `&function_with_enable_if_attrs` an error
This fixes a bug where one can take the address of a conditionally enabled function to drop its enable_if guards. For example: int foo(int a) __attribute__((enable_if(a > 0, ""))); int (*p)(int) = &foo; int result = p(-1); // compilation succeeds; calls foo(-1) Overloading logic has been updated to reflect this change, as well. Functions with enable_if attributes that are always true are still allowed to have their address taken. Differential Revision: http://reviews.llvm.org/D13607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions