xazax.hun accepted this revision.
xazax.hun added inline comments.

================
Comment at: 
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:115
+      // optional::has_value
+      .CaseOf(isOptionalMemberCallWithName("has_value"),
+              transferOptionalHasValueCall)
----------------
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




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

Reply via email to