================
@@ -5181,6 +5181,18 @@ OptimizeNoneAttr *Sema::mergeOptimizeNoneAttr(Decl *D,
 }
 
 static void handleAlwaysInlineAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+  AlwaysInlineAttr AIA(S.Context, AL);
+  if (!S.getLangOpts().MicrosoftExt &&
----------------
trungnt2910 wrote:

> That's expected behavior -- we diagnose when attributes are ignored. You get 
> the same behavior with other attributes: https://godbolt.org/z/sGn87r3o6

`[[msvc::constexpr]]` is a weird semi-undocumented attribute - it is not 
specified on the official Microsoft Docs and only explained on the [Visual 
Studio 
Feedback](https://developercommunity.visualstudio.com/t/10259132#T-N10259447) 
page when a LLVM contributor specifically asked them about it.

Many other less esoteric `[[msvc::` attributes are left unguarded, such as the 
opposite of the newly added attributes, `[[msvc::noinline]]`: 
https://godbolt.org/z/W8519n6d1



https://github.com/llvm/llvm-project/pull/185282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to