[cfe-commits] r90327 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp lib/AST/RecordLayoutBuilder.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp test/SemaCXX/implicit-virtual-member-fun

Eli Friedman eli.friedman at gmail.com
Wed Dec 2 14:37:19 PST 2009


On Wed, Dec 2, 2009 at 12:55 PM, Anders Carlsson <andersca at mac.com> wrote:
>
> On Dec 2, 2009, at 12:05 PM, Eli Friedman wrote:
>
>> On Wed, Dec 2, 2009 at 9:15 AM, Anders Carlsson <andersca at mac.com> wrote:
>>> Author: andersca
>>> Date: Wed Dec  2 11:15:43 2009
>>> New Revision: 90327
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=90327&view=rev
>>> Log:
>>> In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.
>>
>> Two questions:
>> 1. Does this mean r90283 should be reverted?
>
> It does, and I did that as part of the fix.
>
>> 2. Why just implicit virtual member functions?  Why not all virtual
>> member functions?  (This affects PR5557.)
>
> Because virtual member functions are already marked. (As for PR5557, I think we should mimic what gcc does and just instantiate at the end of the translation unit).

Well, we skip calling MarkDeclarationReferenced in some cases where we
end up with references, but I guess it's not too important in general
considering that the only effect of that for non-template non-implicit
member functions is that the Used bit gets set.

-Eli




More information about the cfe-commits mailing list