[clang] [Clang][UnsafeBufferUsage] Warn about two-arg string_view constructors. (PR #180471)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 17 22:18:29 PST 2026
================
@@ -699,6 +699,67 @@ static bool isSafeSpanTwoParamConstruct(const CXXConstructExpr &Node,
return isPtrBufferSafe(Arg0, Arg1, Ctx);
}
+static bool isSafeStringViewTwoParamConstruct(const CXXConstructExpr &Node,
----------------
ziqingluo-90 wrote:
I think `isPtrBufferSafe` has covered these patterns so that you can reuse it.
https://github.com/llvm/llvm-project/pull/180471
More information about the cfe-commits
mailing list