[PATCH] D158557: [clang] Fix crash in __builtin_strncmp and other related builtin functions

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 15:28:35 PDT 2023


shafik added a comment.

In D158557#4608262 <https://reviews.llvm.org/D158557#4608262>, @erichkeane wrote:

> Are there any Sema tests we can add to show that we warn/diagnose/SOMETHING on these?  If someone passes a negative size, we should probably at least do the warning that it was converted/truncated.

The arguments have type `size_t` so using `-Wsign-conversion` would warn for the previous value but that is not really the point of the fix, which is why I updated the value to clarify.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158557/new/

https://reviews.llvm.org/D158557



More information about the cfe-commits mailing list