================
@@ -1350,10 +1360,17 @@ void
Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD,
llvm::APSInt::getUnsigned(H.getSizeLowerBound())
.extOrTrunc(SizeTypeWidth);
if (FormatSize > *SourceSize && *SourceSize != 0) {
- DiagID = diag::warn_fortify_source_format_truncation;
- DestinationSize = SourceSize;
- SourceSize = FormatSize;
- break;
----------------
hazohelet wrote:
This is intentional.
When the truncation warning was grouped under `Wfortify-source`, I thought it
made sense to override the warning because there was no way to disable only one
of `warn_fortify_source_size_mismatch` and the truncation warning.
Now that `Wformat-truncation` is made, I no longer think this warning should
hide the `Wfortify-source` warning.
https://github.com/llvm/llvm-project/pull/65969
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits