[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
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
> Since functions returns bool, comment is confusing.
> Maybe, return 'true' if type has noreturn attribute; false,
> This function does not preserve the other attributes. For example,
> block pointers can be __weak/__strong.
> See ASTContext::getObjCGCQualType.
>> + 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
>> + if (!Type->isFunctionPointerType()
>> + && !Type->isBlockPointerType()
>> + && !Type->isFunctionType())
> And here?
More information about the cfe-commits