mbenfield added inline comments.
================ Comment at: clang/lib/Sema/SemaChecking.cpp:739 DiagID = diag::warn_fortify_source_size_mismatch; - SizeIndex = TheCall->getNumArgs() - 1; - ObjectIndex = 0; + SourceSize = ComputeCheckVariantSize(TheCall->getNumArgs() - 1); + DestinationSize = ComputeSizeArgument(0); ---------------- george.burgess.iv wrote: > i expected `ComputeCheckVariantSize` to imply that the argument was to a > `_chk` function, but these `case`s don't reference `_chk` functions (nor do > we set `IsChkVariant = true;`). should this be calling `ComputeSizeArgument` > instead? Maybe the name `ComputeCheckVariantSize` was misleading and it'll be more clear now that I'm changing the name, but these functions like `strncat`, the `memcpy`s below, and `snprintf`, etc, all take an explicit size argument just like the `_chk` functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104887/new/ https://reviews.llvm.org/D104887 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits