On May 4, 2011, at 5:20 PM, Matt Beaumont-Gay wrote:
> On Wed, May 4, 2011 at 15:56, John McCall <[email protected]> wrote:
>> 
>> On May 4, 2011, at 3:10 PM, Matt Beaumont-Gay wrote:
>>> +  if (!FunTy)
>>> +    FunTy = ExprTy->getAs<FunctionType>();
>>> +  if (!FunTy && ExprTy == Context.BoundMemberTy) {
>>> +    // Look for the bound-member type.  If it's still overloaded, give up,
>>> +    // although we probably should have fallen into the OverloadExpr case 
>>> above
>>> +    // if we actually have an overloaded bound member.
>>> +    QualType BoundMemberTy = Expr::findBoundMemberType(&E);
>>> +    if (!BoundMemberTy.isNull())
>>> +      FunTy = BoundMemberTy->castAs<FunctionType>();
>> 
>> For what it's worth, that's not true;  if all the functions in an overload 
>> set for
>> are non-static member functions, the expression will have BoundMember
>> type.  This is a useful case to get right, too, because a lot of common
>> member functions are overloaded, like the STL's begin() and end().
> 
> Take a guess who added the original version of this snippet to SemaExpr :)
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?r1=130239&r2=130238&pathrev=130239

I should've paid closer attention, then. :)

> I'm not clear on what part of this you're saying is untrue. FWIW, for
> simple cases involving member functions, we do the right thing:

Well, as long as that's true, it doesn't much matter.  I'll look closer on my 
own.

Thanks!

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to