================ @@ -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; + + /// Get the total size in bytes allocated by calling a function decorated with + /// alloc_size. Returns true if the the result was successfully evaluated. + bool getBytesReturnedByAllocSizeCall(const ASTContext &Ctx, ---------------- erichkeane wrote:
I'd rather this return an optional. https://github.com/llvm/llvm-project/pull/150028 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits