apple-fcloutier wrote:
There's a handful of drivers for the size of the SemaChecking change:
* generalize things that were previously specific to FormatAttr, pipe through
expected format where applicable;
* tolerate the new FAPK_External for when the format arguments are invisible to
the caller;
* implement comparing format strings.
The last one is the biggest one. SemaChecking knows how to check that a format
string matches a provided list of arguments, but it doesn't know (before this
change) how to check that two format strings are equivalent. This is because
checking format strings is done (conceptually) by zipping format specifiers and
argument types and seeing if they match with some fuzziness, rather than
converting a format string to a list of types and then checking them together.
I needed to implement a way to match two format strings "in abstract" for
FormatMatches.
The second one causes change that look large in the diff but that are actually
rather simple (for instance, wrapping a large-ish block of code in
`CheckPrintfHandler::HandlePrintfSpecifier` with `if (HasFormatArguments()) {`).
https://github.com/llvm/llvm-project/pull/116708
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits