[PATCH] Don't trap when passing non-POD arguments to variadic functions in MS-compatibility mode

Hans Wennborg hans at chromium.org
Mon Sep 29 16:16:41 PDT 2014


================
Comment at: lib/Sema/SemaExpr.cpp:878-879
@@ -877,3 +877,4 @@
   // emitted along with format string checking in Sema::CheckFunctionCall().
-  if (isValidVarArgType(E->getType()) == VAK_Undefined) {
+  if (isValidVarArgType(E->getType()) == VAK_Undefined &&
+      !LangOpts.MSVCCompat) {
     // Turn this into a trap.
----------------
rsmith wrote:
> Maybe this should be a separate `VAK_` value, `VAK_ValidInMSVC` or similar?
I used VAK_MSVCUndefined.

http://reviews.llvm.org/D5492






More information about the cfe-commits mailing list