[cfe-commits] r90283 - in /cfe/trunk: lib/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp test/CodeGenCXX/virtual-destructor-synthesis.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Dec 1 18:00:04 PST 2009


On Dec 1, 2009, at 3:43 PM, Eli Friedman wrote:

> On Tue, Dec 1, 2009 at 3:18 PM, Fariborz Jahanian  
> <fjahanian at apple.com> wrote:
>> Author: fjahanian
>> Date: Tue Dec  1 17:18:25 2009
>> New Revision: 90283
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=90283&view=rev
>> Log:
>> Fix a code gen. crash synthesizing a destructor.
>> Fixes pr5660.
>
> This patch looks very wrong.  I think the real issue here is something
> similar to PR5557: Sema doesn't know whether the vtable is created,
> and therefore doesn't do the stuff that MarkDeclarationReferenced is
> supposed to do for virtual functions.

Yes, that is the problem. Patch just looks up the delete operator
and makes it available in the destructor to be used, if synthesis is
to occur. Can you point to what can go wrong?  Somehow, Sema must
figure out what Code gen. needs and provide the delete operator;  
otherwise.
I am not sure how this can be accomplished as it depends on the entire  
source scan.

- Fariborz


>
> -Eli




More information about the cfe-commits mailing list