[PATCH] Delete CC_Default and use the target default CC everywhere
Reid Kleckner
rnk at google.com
Mon Jul 29 13:09:59 PDT 2013
Hi rsmith,
Makes functions with implicit calling convention compatible with
function types with a matching explicit calling convention. This fixes
things like calls to qsort(), which has an explicit __cdecl attribute on
the comparator in Windows headers.
Clang will now infer the calling convention from the declarator. There
are two cases when the CC must be adjusted during redeclaration:
1. When defining a non-inline static method.
2. When redeclaring a function with an implicit or mismatched
convention.
Fixes PR13457, and allows clang to compile CommandLine.cpp for the
Microsoft C++ ABI.
Excellent test cases provided by Alexander Zinenko!
http://llvm-reviews.chandlerc.com/D1231
Files:
include/clang/AST/ASTContext.h
include/clang/AST/Type.h
include/clang/Basic/Specifiers.h
include/clang/Basic/TargetInfo.h
lib/AST/ASTContext.cpp
lib/AST/DumpXML.cpp
lib/AST/MicrosoftMangle.cpp
lib/AST/Type.cpp
lib/AST/TypePrinter.cpp
lib/Basic/Targets.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/TargetInfo.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaLookup.cpp
lib/Sema/SemaType.cpp
test/CodeGen/mrtd.c
test/Sema/callingconv.c
test/SemaCXX/calling-conv-compat.cpp
test/SemaCXX/decl-microsoft-call-conv.cpp
test/SemaCXX/virtual-override-x86.cpp
tools/libclang/CXType.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1231.1.patch
Type: text/x-patch
Size: 63561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130729/d5dfc90c/attachment.bin>
More information about the cfe-commits
mailing list