[clang] [Clang] Add __has_target_builtin macro (PR #126324)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 14 07:32:23 PST 2025
AaronBallman wrote:
> Maybe the problem with the name I am having is the word `has`. Maybe `__can_use_builtin` seems like a better name. And that seems like would be a good context sensative clue.
That's actually a really good idea, thank you! But I think users will still have the very reasonable question of why there's a `__has_builtin` that's different from `__can_use_builtin` (or whatever we name it), and I don't know that any of us have an answer for that, which is a bit worrying to me. It'd be nice if we were able to either have one builtin that behaves how users would expect, or if we had a compelling example we could document that helps users to understand when to use one feature test macro vs the other.
https://github.com/llvm/llvm-project/pull/126324
More information about the cfe-commits
mailing list