summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] NFC: Change evalCall() to provide a CallEvent.Artem Dergachev2019-06-191-13/+11
| | | | | | | | | | | | This changes the checker callback signature to use the modern, easy to use interface. Additionally, this unblocks future work on allowing checkers to implement evalCall() for calls that don't correspond to any call-expression or require additional information that's only available as part of the CallEvent, such as C++ constructors and destructors. Differential Revision: https://reviews.llvm.org/D62440 llvm-svn: 363893
* [analyzer] SmartPtrModeling: Fix a null dereference.Artem Dergachev2019-04-301-1/+1
| | | | | | | | | Don't crash when trying to model a call in which the callee is unknown in compile time, eg. a pointer-to-member call. Differential Revision: https://reviews.llvm.org/D61285 llvm-svn: 359530
* [analyzer] PR41269: Add a bit of C++ smart pointer modeling.Artem Dergachev2019-04-231-0/+74
Implement cplusplus.SmartPtrModeling, a new checker that doesn't emit any warnings but models methods of smart pointers more precisely. For now the only thing it does is make `(bool) P` return false when `P` is a freshly moved pointer. This addresses a false positive in the use-after-move-checker. Differential Revision: https://reviews.llvm.org/D60796 llvm-svn: 358944
OpenPOWER on IntegriCloud