sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:31 +struct UncheckedOptionalAccessModelOptions { + /// Ignore optionals reachable by derefencing a smart pointer (other than + /// optional itself). The analysis does not track smart-pointer pointees, so ---------------- Can you clarify what "smart pointer" refers to? It's not only standard types like `unique_ptr`, `shared_ptr`, and `weak_ptr`, right? ================ Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:32 + /// Ignore optionals reachable by derefencing a smart pointer (other than + /// optional itself). The analysis does not track smart-pointer pointees, so + /// it can't identify when optionals resulting from dereferencing such ---------------- ================ Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:1923-1927 + template <typename T> + struct unique_ptr { + T& operator*() &; + T* operator->(); + }; ---------------- Let's add this to a `memory.h` header. ================ Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:1929 + + struct Member { + $ns::$optional<int> opt; ---------------- Why `Member`? I suggest either using one of the generic names that we use above or maybe something more descriptive. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122143/new/ https://reviews.llvm.org/D122143 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits