On Jun 3, 2011, at 3:14 PM, Jonathan Turner wrote:

> 
> On Jun 3, 2011, at 2:03 PM, Douglas Gregor wrote:
>> +  // Source locations require array (variable-length) abbreviations.  The
>> +  // abbreviation infrastructure requires that arrays are encoded last, so
>> +  // we handle it here in the case of those clases derived from 
>> DeclaratorDecl
>> 
>> Typo "clases"
> 
> Fixed.
> 
>> @@ -169,6 +176,20 @@
>> void ASTDeclWriter::VisitTypedefDecl(TypedefDecl *D) {
>>  VisitTypeDecl(D);
>>  Writer.AddTypeSourceInfo(D->getTypeSourceInfo(), Record);
>> +
>> +  if (!D->hasAttrs() &&
>> +      !D->isImplicit() &&
>> +      !D->isUsed(false) &&
>> +      D->getPCHLevel() == 0 &&
>> +      D->RedeclLink.getNext() == D &&
>> +      !D->isInvalidDecl() &&
>> +      !D->isReferenced() &&
>> +      D->getAccess() == AS_none &&
>> +      D->getDeclName().getNameKind() == DeclarationName::Identifier &&
>> +      D->getTypeSourceInfo())
>> +
>> +    AbbrevToUse = Writer.getDeclTypedefAbbrev();
>> 
>> Do we actually need the D->getTypeSourceInfo() check here? It seems 
>> unnecessary.
> 
> I'm being careful with any node types that use the TypeSourceInfo because the 
> call to ASTWriter::AddTypeSourceInfo works differently if its first argument 
> (which is D->getTypeSourceInfo() for us) is 0.   

Sure, but as long as it always puts *something* into the record, we should be 
fine.

> 
> Done.  Looks like I should have commit access now.

Okay!

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

Reply via email to