Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, though I'm hoping either there aren't many more of these cases or we can treat them more generally somehow. Comment at: lib/Sema/SemaCast.cpp:1771-1782 @@ +1770,14 @@ + +

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263887: [Sema] Allow casting of some overloaded functions (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D17701?vs=49334&id=51119#toc Repository: rL LLVM http://reviews.llvm.or

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread George Burgess IV via cfe-commits
george.burgess.iv marked an inline comment as done. Comment at: lib/Sema/SemaCast.cpp:1771-1782 @@ +1770,14 @@ + + DeclAccessPair DAP; + FunctionDecl *Found = Self.resolveAddressOfOnlyViableOverloadCandidate(E, DAP); + if (!Found) +return false; + + Self.CheckAddressOfMem

[PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-02-28 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added a subscriber: cfe-commits. Given the following declarations for `foo`: ``` void foo(int a); void foo(int a) __attribute__((enable_if(a, ""))); ``` ...The only way to `reinterpret_cast` `