[clang] [clang] Add support for [[clang::diagnose_if(...)]] and [[clang::enable_if(...)]] syntax (PR #225900)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 25 12:47:55 PDT 2026
================
@@ -1938,7 +1902,7 @@ def EnableIf : InheritableAttr {
// Does not have a [[]] spelling because this attribute requires the ability
// to parse function arguments but the attribute is not written in the type
// position.
- let Spellings = [GNU<"enable_if">];
+ let Spellings = [Clang<"enable_if">];
----------------
higher-performance wrote:
> Vendor attributes have latitude to answer these questions however we want, but generally speaking, if it impacts the type it will impact things like conversions.
But this is exactly what I was asking about below: the fact that it's vendor-specific means the meaning could easily be "this does not change the type", right? (e.g., surely the standard can't mandate that a vendor-specific attribute changes the type in any way?) ISTM there is no impact unless you want there to be one, which is why I'm saying I'm struggling to see an actual problem.
https://github.com/llvm/llvm-project/pull/225900
More information about the cfe-commits
mailing list