[clang] [BoundsSafety][NFC] Add counted_by type-shape validation helper (PR #227774)

Mohammed Ashraf via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 14 10:57:36 PDT 2026


================
@@ -710,6 +710,12 @@ class LangOptions : public LangOptionsBase {
     return ConvergentFunctions;
   }
 
+  /// Return true if bounds attributes follow the -fbounds-safety programming
+  /// model. Downstream, which has the full -fbounds-safety implementation, uses
+  /// this predicate to gate behavior that differs from upstream. Remove it once
+  /// that divergence is resolved.
+  bool hasBoundsSafetyAttributes() const { return BoundsSafety; }
----------------
Holo-xy wrote:

changed it to what you suggested. 
LMK if we want to make an issue and link it or just leave it as a todo for now.

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


More information about the cfe-commits mailing list