[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-18 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD closed this revision. RedDocMD added a comment. For some reason this revision did not get automatically closed after commit, manually merging it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-15 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 359211. RedDocMD added a comment. Post rebase cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-13 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision. vsavchenko added a comment. In D105421#2873458 , @RedDocMD wrote: > Removed stupid mistakes No need for self deprecation here! Thanks for addressing these! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-13 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 358204. RedDocMD added a comment. Removed stupid mistakes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:87 +static bool hasStdClassWithName(const CXXRecordDecl *RD, +const ArrayRef &Names) { + if (!RD || !RD->getDeclContext()->isStdNamespace()) -

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-10 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 357724. RedDocMD added a comment. Little refactors, one more test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtr

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-10 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD marked 4 inline comments as done. RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:195 +const SmallVector BasicOstreamName = {"basic_ostream"}; + vsavchenko wrote: > Same here + don't call it "Name" (si

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great, thanks! Comment at: clang/test/Analysis/smart-ptr.cpp:472-474 + // We are testing the fact that in our modelling of + // operator<<(basic_ostream &, const unique_ptr &) +

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-09 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Great, thanks for addressing my comments! I still have a couple of minor suggestions though. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:99-100 + +const SmallVector StdPtrNames = {"shared_ptr", "unique_ptr", +

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-09 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 357422. RedDocMD added a comment. Tests implemented Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-08 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. I will be figuring out some tests tomorrow morning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 ___ cfe-commits mailing list cfe-c

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-08 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 357307. RedDocMD added a comment. Little refactors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp I

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Good job, great to see how you are going through the whole list of methods! As for the patch, some tests and COMMENTS will be nice. Also, I think that for a checker that models quite a lot of functions and methods, we need to follow the pattern: if (isMethodA(...

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yes, I think this totally works now! Can you also add some tests? Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:85 +// Checks if RD has name in Names and is in std namespace +bool hasStdClassWithName(const CXXRecordDecl *RD, +

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-07 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:218-219 + + if (isStdOstreamOperatorCall(Call)) +return true; + NoQ wrote: > When you're doing `evalCall` you're responsible for modeling *all* aspects of > t

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-07 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 357031. RedDocMD added a comment. Invalidating regions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105421/new/ https://reviews.llvm.org/D105421 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtr.h clang/

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:218-219 + + if (isStdOstreamOperatorCall(Call)) +return true; + When you're doing `evalCall` you're responsible for modeling *all* aspects of the call. One does no

[PATCH] D105421: [analyzer] Handle << operator for std::unique_ptr

2021-07-05 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 re