================
@@ -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)
----------------
rapidsna wrote:

In many cases, checking whether attributes exist may be sufficient, yes. 
However, attributes may be available without -fbounds-safety — attributes are 
useful for documentation, interop, FORTIFY_SOURCE, warnings, etc., without 
needing full bounds safety enforcement. Therefore, checking whether an 
attribute is supported is not sufficient if the code needs to behave 
differently depending on whether -fbounds-safety is enabled — e.g., some users 
guard their tests with has_feature(bounds_safety) since the test may or may not 
trap.

https://github.com/llvm/llvm-project/pull/182994
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to