Add comment indicating that we intentionally don't add the noreturn

attribute to a FunctionDecl.

llvm-svn: 99662
This commit is contained in:
Ted Kremenek 2010-03-26 22:57:10 +00:00
parent c14922f14a
commit ee0934e05d
1 changed files with 3 additions and 0 deletions

View File

@ -490,6 +490,9 @@ static bool HandleCommonNoReturnAttr(Decl *d, const AttributeList &Attr,
} }
static void HandleNoReturnAttr(Decl *d, const AttributeList &Attr, Sema &S) { static void HandleNoReturnAttr(Decl *d, const AttributeList &Attr, Sema &S) {
// NOTE: We don't add the attribute to a FunctionDecl because the noreturn
// trait will be part of the function's type.
// Don't apply as a decl attribute to ValueDecl. // Don't apply as a decl attribute to ValueDecl.
// FIXME: probably ought to diagnose this. // FIXME: probably ought to diagnose this.
if (isa<ValueDecl>(d)) if (isa<ValueDecl>(d))