[clang] Added support for `__has_feature(bounds_safety)` macro evaluation (PR #182994)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 25 14:54:06 PST 2026


================
@@ -324,6 +324,7 @@ FEATURE(shadow_call_stack,
 FEATURE(tls, PP.getTargetInfo().isTLSSupported())
 FEATURE(underlying_type, LangOpts.CPlusPlus)
 FEATURE(experimental_library, LangOpts.ExperimentalLibrary)
+FEATURE(bounds_safety, LangOpts.BoundsSafety)
----------------
abhijeetsharma200 wrote:

Tangentially related, there is a FIXME in a commented out section of `Features.def` that also has this question. 

```
// FIXME: Should this be __has_feature or __has_extension?
// FEATURE(raw_invocation_type, LangOpts.CPlusPlus)
```

https://github.com/llvm/llvm-project/pull/182994


More information about the cfe-commits mailing list