[cfe-commits] r80446 - in /cfe/trunk: lib/AST/DeclCXX.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaTemplate/instantiate-member-initializers.cpp

Eli Friedman eli.friedman at gmail.com
Sun Aug 30 13:24:52 PDT 2009


On Sun, Aug 30, 2009 at 11:15 AM, Fariborz Jahanian<fjahanian at apple.com> wrote:
>
> On Aug 29, 2009, at 5:40 PM, Eli Friedman wrote:
>
>> On Sat, Aug 29, 2009 at 5:35 PM, Fariborz Jahanian<fjahanian at apple.com>
>> wrote:
>>>
>> We have to build the node because otherwise, there isn't anywhere in
>> the AST for the initializers to live.  In the dependent case, yes, we
>
> Of course we need to build the initializer. Focus of the question is when
> we have dependent type initializers.
>>
>> could skip all analysis; if we did that, though, we would miss a class
>> of errors which could be detected earlier, specifically the case where
>> a member that requires an initializer doesn't have one.
>
> We don't need to skip the analysis. We just don't build
> BaseOrMemberInitializers if
> there is even one dependent case.

The issue was that the initializer wasn't ever getting seen by the
instantiation code.  I'm really not following what you're saying; I'll
try to look at the code in more detail later.

-Eli




More information about the cfe-commits mailing list