[cfe-commits] r84362 - in /cfe/trunk: lib/Sema/Sema.h lib/Sema/SemaExprCXX.cpp lib/Sema/SemaOverload.cpp test/CodeGenCXX/address-of-fntemplate.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Wed Oct 21 00:42:37 PDT 2009

On Tue, 20 Oct 2009 16:18:27 -0700, Anders Carlsson <andersca at mac.com>
> On Oct 17, 2009, at 1:50 PM, Sebastian Redl wrote:
>> Author: cornedbee
>> Date: Sat Oct 17 15:50:27 2009
>> New Revision: 84362
>> URL: http://llvm.org/viewvc/llvm-project?rev=84362&view=rev
>> Log:
>> Don't add implicit casts of explicit address-taking of overloaded
>> functions.
>> Taking the address of an overloaded function with an explicit address-of
>> operator wrapped the operator in an implicit cast that added yet another
>> pointer level, leaving us with a corrupted AST, which crashed CodeGen in
>> the test case I've added. Fix this by making
>> FixOverloadedFunctionReference return whether there was an address-of
>> operator and not adding the implicit cast in that case.
> Hi Sebastian,
> is there a reason why we can't just check the ExprType and not cast if
> already a pointer or pointer-to-member-function type?

I can't think of any reason not to do that. Go ahead.


More information about the cfe-commits mailing list