[Sema] Allow casting of some overloaded functions
Some functions can't have their address taken. If we encounter an overload set where only one of the candidates can have its address taken, we should automatically select that candidate in cast expressions. Differential Revision: http://reviews.llvm.org/D17701 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263887 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Sema/Sema.h 4 additions, 0 deletionsinclude/clang/Sema/Sema.h
- lib/Sema/SemaCast.cpp 45 additions, 13 deletionslib/Sema/SemaCast.cpp
- lib/Sema/SemaOverload.cpp 37 additions, 1 deletionlib/Sema/SemaOverload.cpp
- test/SemaCXX/enable_if.cpp 93 additions, 0 deletionstest/SemaCXX/enable_if.cpp
- test/SemaCXX/unaddressable-functions.cpp 36 additions, 0 deletionstest/SemaCXX/unaddressable-functions.cpp
Loading
Please register or sign in to comment