jkorous added inline comments.
================ Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2379 + for (auto UnsafeUse : UnsafeUses) + if (!DE.isSafeBufferOptOut(SM, UnsafeUse->getBeginLoc())) + UnsafeUsesToReport.push_back(UnsafeUse); ---------------- NoQ wrote: > I believe this check should be performed *much earlier*. It's not about how > we display unsafe usages to the user; we can exclude variables from analysis > entirely when all their unsafe uses are guarded by the pragma. I suspect that > we can drop these gadgets as early as in `findGadgets()` phase (assuming that > D140062 causes us to never rely on unsafe gadgets for fixits). Let's addres this in a follow-up patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140179/new/ https://reviews.llvm.org/D140179 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits