================
@@ -1496,7 +1522,24 @@ void
Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD,
Checker.checkSourceOverread(/*SrcArgIdx=*/0, /*SizeArgIdx=*/2);
break;
}
-
+ case Builtin::BIfread: {
+ DiagID = diag::warn_fortify_source_overflow;
+ SourceSize = Checker.ComputeExplicitObjectSizeArgumentProduct(1, 2);
+ DestinationSize = Checker.ComputeSizeArgument(0);
+ break;
+ }
+ case Builtin::BIfwrite: {
+ DiagID = diag::warn_fortify_source_overread;
----------------
bozicrHT wrote:
I don't think so. I kept a fortify-specific diagnostic because
`warn_stringop_overread` belongs to `-Wstringop-overread`, while this check is
controlled by `-Wforitfy-source`.
https://github.com/llvm/llvm-project/pull/204337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits