HsiangKai added inline comments.

================
Comment at: clang/include/clang/Basic/Attr.td:646
+def BuiltinAlias : Attr {
+  let Spellings = [Clang<"clang_builtin_alias">];
+  let Args = [IdentifierArgument<"BuiltinName">];
----------------
aaron.ballman wrote:
> Hrm, this is interesting -- this will allow the user to write 
> `__attribute__((clang_builtin_alias(...)))` which is nice, but it also allows 
> `[[clang::clang_builtin_alias(...)]]` which duplicates the `clang` in that 
> spelling and feels a bit awkward.
> 
> While we could steal `__attribute__((builtin_alias))` as it seems like no one 
> is using it, that feels a bit heavy-handed as builtins may not be portable 
> across compilers.
> 
> Based on that, I sort of think we should go with:
> ```
> let Spellings = [CXX11<"clang", "builtin_alias">, C2x<"clang", 
> "builtin_alias">, GNU<"clang_builtin_alias">];
> ```
> What do you think?
It makes sense to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100611/new/

https://reviews.llvm.org/D100611

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to