[llvm-dev] MSVC warning noise on "LLVM_ATTRIBUTE_ALWAYS_INLINE inline void foo()"

Johan Engelen via llvm-dev llvm-dev at lists.llvm.org
Sun Dec 20 14:57:51 PST 2015

On Sun, Dec 20, 2015 at 11:28 PM, Aaron Ballman <aaron at aaronballman.com>

> On Sun, Dec 20, 2015 at 5:24 PM, Xinliang David Li via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > LLVM_ATTRIBUTE_ALWAYS_INLINE is defined to be __forceinline for MSVC. I
> > wonder why you get that warning.
> inline and __forceinline don't mix with MSVC -- I believe they may be
> modeled with the same attribute under the hood. I'm not certain of the
> best way to solve this aside from suggesting to ignore C4141 locally.

Perhaps LLVM_ATTRIBUTE_ALWAYS_INLINE could be defined to "inline" if the
compiler has no support for always_inline (currently it is set to nothing
in that case) ?
I think this would allow removal of the "inline" after
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151220/7b311892/attachment.html>

More information about the llvm-dev mailing list