[PATCH] D83836: [Analyzer] Implementing checkRegionChanges for SmartPtrModeling
Nithin VR via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 18:16:39 PDT 2020
vrnithinkumar marked 3 inline comments as done.
vrnithinkumar added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:180
+ProgramStateRef SmartPtrModeling::checkRegionChanges(
+ ProgramStateRef State, const InvalidatedSymbols *Invalidated,
----------------
I am using the same code from the `MoveChecker` since the same logic applies here too.
But I am not completely sure whether this is the clean approach.
================
Comment at: clang/test/Analysis/Inputs/system-header-simulator-cxx.h:962
+ operator bool() const;
+ unique_ptr<T> &operator=(unique_ptr<T> &&p);
+};
----------------
added this to support use case like `Q = std::move(P)`
================
Comment at: clang/test/Analysis/smart-ptr.cpp:145
+
+struct StructWithSmartPtr {
+ std::unique_ptr<A> P;
----------------
@xazax.hun , Is this the type of test you were suggesting?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83836/new/
https://reviews.llvm.org/D83836
More information about the cfe-commits
mailing list