[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-18 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD abandoned this revision. RedDocMD added a comment. I am closing this since it has been addressed much better by the patches from @vsavchenko. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103434/new/ https://reviews.llvm.org/D103434

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-03 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. In D103434#2795940 , @vsavchenko wrote: > I was thinking a lot about this problem after our last call, and even though > `StoppableVisitor` helps to solve the problem that we have, it is extremely > unclear when this callback

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. I was thinking a lot about this problem after our last call, and even though `StoppableVisitor` helps to solve the problem that we have, it is extremely unclear when this callback is called and should be called. I decided to restore the balance (and rid of all

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:95 + /// This method is run once the \ref Stop method is called. + virtual void OnStop(const ExplodedNode *Curr, BugReporterContext , +

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Tests to verify that ReturnVisitor actually does what we intend it to do > (call the callback at the right place). You mean write a test that demonstrates that? I guess unless we're willing to wait for the checker to catch up, a good approach to this would be to write a

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. The following things are now done: - `trackExpressionValue` must receive a callback - The callback must be passed to a visitor (`ReturnVisitor` for now) I still don't know a good way to test the following: - Tests to verify that `ReturnVisitor` actually does what we

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-02 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 349295. RedDocMD added a comment. trackExpressionValue recieving callback, passing it to ReturnVisitor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103434/new/ https://reviews.llvm.org/D103434 Files:

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-01 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:95 + /// This method is run once the \ref Stop method is called. + virtual void OnStop(const ExplodedNode *Curr, BugReporterContext , +

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:95 + /// This method is run once the \ref Stop method is called. + virtual void OnStop(const ExplodedNode *Curr, BugReporterContext , +

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-01 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:895 +using VisitorCallback = llvm::function_ref; `function_ref` is a reference, it doesn't own the function. It means that it shouldn't outlive the actual

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-06-01 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. **Note: This patch is only partially done.** The following things are still left: - `trackExpressionValue` must receive a callback - The callback must be passed to a visitor (`ReturnVisitor` for now) - Tests to verify that `ReturnVisitor` actually does what we intend

[PATCH] D103434: [analyzer] Allow visitors to run callbacks on completion

2021-05-31 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD created this revision. RedDocMD added reviewers: NoQ, vsavchenko, xazax.hun, teemperor. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. RedDocMD requested review of this