[PATCH] D104887: [clang] Evaluate strlen of strcpy argument for -Wfortify-source.
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 15 11:05:45 PDT 2021
cjdb added a comment.
Thanks for getting around to this! Just a nit and a clarifying question.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:821
+ "'%0' will always overflow; destination buffer has size %1,"
+ " but the source string has length %2 (including null byte)">,
+ InGroup<FortifySource>;
----------------
Nit: s/null/NUL
================
Comment at: clang/lib/AST/ExprConstant.cpp:15737
+
+ // Fall through to slow path.
+ }
----------------
This comment is slightly different to the RHS: does that mean that a diagnostic might not be issued?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104887/new/
https://reviews.llvm.org/D104887
More information about the cfe-commits
mailing list