Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-12 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D13607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-12 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL250090: [Sema] Make `_with_enable_if_attrs` an error (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D13607?vs=37075=37152#toc Repository: rL LLVM

Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-11 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaInit.cpp:4978-4990 @@ -4977,1 +4977,15 @@ +// As an extension, C can have overloaded functions. We need to add the +// address resolution step. +if (Initializer->getType() == Context.OverloadTy) { +

Re: [PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:10246-10253 @@ -10245,1 +10245,10 @@ + +if (RHS.get()->getType() == Context.OverloadTy) { + // As a set of extensions to C, we support overloading on functions. These + // functions need to be resolved

[PATCH] D13607: [Fix] Make it an error to take the address of (most) enable_if functions.

2015-10-09 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. For the following function: ``` int foo(int a) __attribute__((enable_if(a > 0, “”))); ``` The callee should be able to reasonably assume that `foo` will be