[PATCH] D139737: [-Wunsafe-buffer-usage] Initiate Fix-it generation for local variable declarations
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 20 10:41:52 PST 2022
jkorous added a comment.
Thanks for the rebase!
Nit: I'd just replace `std::function` with `auto` as it saves us repeating the parameter types (and `#include <functional>`).
================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:617
+ // Printers that print extent into OS and sets ExtKnown to true:
+ std::function PrintExpr = [&ExtKnown, &OS, &PP](const Expr *Size) {
+ Size->printPretty(OS, nullptr, PP);
----------------
================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:621
+ };
+ std::function PrintAPInt = [&ExtKnown, &OS](const APInt &Size) {
+ Size.print(OS, false);
----------------
================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:625
+ };
+ std::function PrintOne = [&ExtKnown, &OS](void) {
+ OS << "1";
----------------
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139737/new/
https://reviews.llvm.org/D139737
More information about the cfe-commits
mailing list