================
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);
----------------
Reid Kleckner wrote:
> This should be a helper like callingConventionIsCalleeCleanup() in
> clang/Basic/Specifiers.h, and then this whole diagnostic makes a lot more
> sense.
SGTM.
I've also changed the code use a whitelist for which CCs we allow with a
warning, rather than just blacklisting thiscall.
http://llvm-reviews.chandlerc.com/D1870
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits