[clang] [clang] Add support for MSVC force inline attrs (PR #185282)
Trung Nguyen via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 19:09:10 PDT 2026
trungnt2910 wrote:
> Thank you for working on this! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new functionality too.
@AaronBallman Thanks for the review. I added a point to the "Attribute Changes" section - not sure if this is the right place since `[[msvc::` attributes are rarely mentioned in the previous release notes.
> Are there plans to also handle `[[msvc::forceinline_calls]]` (https://learn.microsoft.com/en-us/cpp/cpp/attributes?view=msvc-170#msvcforceinline_calls) which sounds like our `[[clang::always_inline]]` behavior on statements?
I am aware of `[[msvc::forceinline_calls]]`. Initially I wanted to keep the PR simple, so I let `[[msvc::forceinline]]` have an "unspecified" effect when added to statements, as MS documentation did not specify what would happen in that case.
Now, with all the additional diagnostics requirements, supporting `[[msvc::forceinline_calls]]` comes at a relatively low cost, so I added that.
https://github.com/llvm/llvm-project/pull/185282
More information about the cfe-commits
mailing list