[cfe-commits] r77089 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/Type.cpp lib/Analysis/CFG.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/CodeGen/array.c test/Sema/return.c

Mike Stump mrs at apple.com
Sat Jul 25 16:35:20 PDT 2009


On Jul 25, 2009, at 2:56 PM, Fariborz Jahanian wrote:
>> +  /// getNoReturnAttr() - Return the noreturn attribute of this  
>> type.
>
> Since functions returns bool, comment is confusing.
> Maybe,  return 'true' if type has noreturn attribute; false,  
> otherwise.

Fixed.

> This function does not preserve the other attributes. For example,   
> block pointers can be __weak/__strong.
> See ASTContext::getObjCGCQualType.

Fixed.

>> +  if (Attr.getNumArgs() != 0)
> Don't you want to issue error here?

There is already error checking that comes from the application to the  
decl and one here would be a dup of that one.

>> +    return;
>> +
>> +  // We only apply this to a pointer to function or a pointer to  
>> block.
>> +  if (!Type->isFunctionPointerType()
>> +      && !Type->isBlockPointerType()
>> +      && !Type->isFunctionType())
>
> And here?

Likewise.

Thanks.



More information about the cfe-commits mailing list