[PATCH] D155524: [-Wunsafe-buffer-usage] Ignore the FixableGadgets that will not be fixed at an earlier stage
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 15:05:00 PDT 2023
NoQ added inline comments.
================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1095-1102
// Gadgets "claim" variables they're responsible for. Once this loop finishes,
// the tracker will only track DREs that weren't claimed by any gadgets,
// i.e. not understood by the analysis.
for (const auto &G : CB.FixableGadgets) {
for (const auto *DRE : G->getClaimedVarUseSites()) {
CB.Tracker.claimUse(DRE);
}
----------------
Let's also skip this part when there are no warning gadgets? Your initial patch was clearing the `FixableGadgets` list so it was naturally skipped, but now it's active again.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155524/new/
https://reviews.llvm.org/D155524
More information about the cfe-commits
mailing list