[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-25 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added a comment. This is a lot of work, thank you @t-rasmud & @NoQ ! I have a minor suggestion: can we use some macros to make the debug stub even shorter? The prefix `"failed to produce fixit for declaration"` is used in many places so probably we do not have to repeat it

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:2248-2249 +#ifndef NDEBUG +// FIXME: F->getBaseStmt() should never be null! +// (Or we should build a better interface for this.) +Handler.addDebugNoteForVar(

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Awesome!! Did you try running it on some real code? Does this actually cover most cases? (I suspect that (1.) is going to be the most popular case, but that's also the easiest case to diagnose visually. We might still want a note if we wanted to prioritize among

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-18 Thread Rashmi Mudduluru via Phabricator via cfe-commits
t-rasmud updated this revision to Diff 541745. t-rasmud added a comment. This patch addresses cases 2, 3, and 4 described in the summary (i.e) adds debug notes for unclaimed uses of variables and for failed fixit generation of variable declarations. CHANGES SINCE LAST ACTION

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-17 Thread Rashmi Mudduluru via Phabricator via cfe-commits
t-rasmud added a comment. I will add debug notes for the rest of the cases not addressed in this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154880/new/ https://reviews.llvm.org/D154880 ___ cfe-commits mailing list

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 538862. NoQ added a comment. Add the other missing base statement. Debugger was acting weirdly so I thought we had bigger problems, but it's just the other thing missing. It's likely that we ultimately want a better interface for that anyway. CHANGES SINCE

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 538852. NoQ added a comment. `private:` => `public:` (for some reason it didn't complain until I did a full rebuild) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154880/new/ https://reviews.llvm.org/D154880 Files:

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:578 - virtual const Stmt *getBaseStmt() const override { return nullptr; } + virtual const Stmt *getBaseStmt() const override { return PtrInitRHS; } I changed this to make

[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.

2023-07-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: jkorous, t-rasmud, ziqingluo-90, malavikasamak. Herald added subscribers: steakhal, martong. Herald added a project: All. NoQ requested review of this revision. Herald added a subscriber: wangpc. This patch adds extra notes to