]> granicus.if.org Git - clang/commit
Standardize the parsing of function type attributes in a way that
authorJohn McCall <rjmccall@apple.com>
Fri, 5 Feb 2010 21:31:56 +0000 (21:31 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 5 Feb 2010 21:31:56 +0000 (21:31 +0000)
commit04a67a6aa3dfdc92d57f7f8d93ba397348c868a4
tree2d199d8d6541ce97e1858876523c9ca2bd5a260e
parente50187a987dadb6a3b6f673125617c8f42ff3560
Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior:  attributes
written on return types that don't apply there are applied to the function
instead, etc.  Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks).  Consistently consume CC/noreturn
information throughout codegen;  enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
29 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/Type.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ASTContext.cpp
lib/AST/Type.cpp
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGCXX.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGException.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenTypes.h
lib/Sema/Sema.h
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/SemaType.cpp
test/CodeGen/attributes.c
test/CodeGen/stdcall-fastcall.c
test/Sema/attr-noreturn.c
test/Sema/callingconv.c
test/Sema/stdcall-fastcall.c