[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 09:23:28 PDT 2023


================
@@ -163,6 +163,10 @@ Improvements to Clang's diagnostics
 - Clang's ``-Wfortify-source`` now diagnoses ``snprintf`` call that is known to
   result in string truncation.
   (`#64871: <https://github.com/llvm/llvm-project/issues/64871>`_).
+  Clang stops calculating the minimum length of the output format string upon %p
+  if the succeeding character can be a part of the format specifier in linux's
+  format extension in order to avoid false positive warnings against the linux
+  code base.
----------------
nickdesaulniers wrote:

perhaps worth referring to "the Linux kernel's ..." rather than just "linux".

https://github.com/llvm/llvm-project/pull/65969


More information about the cfe-commits mailing list