Support `__has_feature(bounds_safety)` macro evaluation
Open
clang:bounds-safety
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Building this source file like:
```
#if __has_feature(bounds_safety)
// OK
#else
#error bounds safety language feature is off
#endif
```
```
$ clang -Xclang -fexperimental-bounds-safety -c tmp/has_bounds_safety_feature.c
```
should not produce errors.
I think adding `FEATURE(bounds_safety, LangOpts.BoundsSafety)` to `include/clang/Basic/Features.def` and a test case should be sufficient.
Contributor guide
Assessment
This issue has not been assessed yet.