[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 22 07:28:19 PDT 2025


================
@@ -3256,6 +3257,14 @@ class CallExpr : public Expr {
     setDependence(getDependence() | ExprDependence::TypeValueInstantiation);
   }
 
+  /// Try to get the alloc_size attribute of the callee. May return null.
+  const AllocSizeAttr *getAllocSizeAttr() const;
----------------
erichkeane wrote:

```suggestion
  const AllocSizeAttr *getCalleeAllocSizeAttr() const;
```

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


More information about the cfe-commits mailing list