[PATCH] Tighten diagnostics for calling conventions on variadic functions
Reid Kleckner
rnk at google.com
Wed Oct 9 10:06:11 PDT 2013
LGTM
================
Comment at: lib/Sema/SemaType.cpp:4546
@@ +4545,3 @@
+ // Diagnose use of X86 stdcall/fastcall/thiscall on variadic functions.
+ if (CC == CC_X86StdCall || CC == CC_X86FastCall || CC == CC_X86ThisCall) {
+ const FunctionProtoType *FnP = dyn_cast<FunctionProtoType>(fn);
----------------
This should be a helper like callingConventionIsCalleeCleanup() in clang/Basic/Specifiers.h, and then this whole diagnostic makes a lot more sense.
http://llvm-reviews.chandlerc.com/D1870
More information about the cfe-commits
mailing list