[clang] [Clang][Sema] Add -Wstringop-overread warning for source buffer overreads (PR #183004)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 24 14:58:18 PST 2026
================
@@ -2927,6 +2927,11 @@ class Sema final : public SemaBase {
CallExpr *TheCall, EltwiseBuiltinArgTyRestriction ArgTyRestr =
EltwiseBuiltinArgTyRestriction::None);
+ /// Check for source buffer overread in memory functions.
+ void checkSourceBufferOverread(FunctionDecl *FD, CallExpr *TheCall,
+ unsigned SrcArgIdx, unsigned SizeArgIdx,
+ StringRef FunctionName = "");
----------------
erichkeane wrote:
Why do you need the function name if you have the decl?
https://github.com/llvm/llvm-project/pull/183004
More information about the cfe-commits
mailing list