[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 19 14:09:56 PDT 2018


compnerd added a comment.

What happens in the case that you have a variadic in C code marked with `__forceinline`?  Does that also cause a warning with MSVC?



================
Comment at: test/Sema/ms-forceinline-on-variadic.cpp:1
+// RUN: %clang_cc1 -emit-llvm -o - -triple i686-windows -verify -fms-extensions %s \
+// RUN:            | FileCheck %s
----------------
Personally, I prefer the fully canonicalized triple name `i686-unknown-windows-msvc`.


================
Comment at: test/Sema/ms-forceinline-on-variadic.cpp:14
+    __builtin_va_end(ap);
+}
+
----------------
Would be nice to have a second test that uses the Microsoft definitions (`char *` and the offsetting handling for the `va_list` since when building against the Windows SDK, that is the way that `va_list` and the `va_*` family of functions will get handled.


Repository:
  rC Clang

https://reviews.llvm.org/D44646





More information about the cfe-commits mailing list