[clang] [Clang] Added clang diagnostic when snprintf/vsnprintf uses sizeof(de… (PR #170637)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 5 00:13:11 PST 2025
================
@@ -1140,6 +1139,37 @@ static bool ProcessFormatStringLiteral(const Expr *FormatExpr,
return false;
}
+static const UnaryExprOrTypeTraitExpr *getAsSizeOfExpr(const Expr *E) {
----------------
ojhunt wrote:
We should avoid this large code movement, we could forward declare these functions instead, but I think a better approach be to move the actual diagnosis logic into a separate function.
https://github.com/llvm/llvm-project/pull/170637
More information about the cfe-commits
mailing list