From 79f5e512d5f930d7ed30c76d3354accd832edd8a Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 26 Mar 2010 22:57:10 +0000 Subject: [PATCH] Add comment indicating that we intentionally don't add the noreturn attribute to a FunctionDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99662 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclAttr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index a81ad768b8..b3041129db 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -490,6 +490,9 @@ static bool HandleCommonNoReturnAttr(Decl *d, const AttributeList &Attr, } 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. // FIXME: probably ought to diagnose this. if (isa(d)) -- 2.50.1