sgatev added inline comments.
================ Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:115 + // optional::has_value + .CaseOf(isOptionalMemberCallWithName("has_value"), + transferOptionalHasValueCall) ---------------- xazax.hun wrote: > One very important omission seems to be `optional::operator bool`. This is a > widely used method and I'd love to see it supported. > > Also would love to see FIXMEs for some of the most more frequently used > functions/methods: > * make_optional makes a non-empty optional > * swap (free function and method) > * value_or returning its argument when the optional is known to be empty > * Model the value semantics: Copy ctor, assignment operator > * Model the move semantics > * Default constructed optional is empty > * Invalidation: passing optional by non-const reference/pointer can > invalidate its state > > Most of these will be implemented in follow up patches soon and you can already find the list in the FIXME in UncheckedOptionalAccessModelTest.cpp. I added to it invalidation so that it covers all features you mentioned here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121197/new/ https://reviews.llvm.org/D121197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits