xazax.hun added inline comments.

================
Comment at: 
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:55
+  return hasType(
+      recordDecl(anyOf(hasName("std::nullopt_t"), hasName("absl::nullopt_t"),
+                       hasName("base::nullopt_t"))));
----------------
Did you consider `hasAnyName`? Or would that not work in this context?


================
Comment at: 
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:75
+
+auto isOptionalNonStandardConstructor() {
+  return cxxConstructExpr(
----------------
What is a `non-standard` constructor? This might be a well-known term I'm not 
aware of. If that is not the case I'd prefer a comment or a more descriptive 
name.


================
Comment at: 
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:263
+          isOptionalMemberCallWithName("emplace"),
+          +[](const CXXMemberCallExpr *E, LatticeTransferState &State) {
+            assignOptionalValue(*E->getImplicitObjectArgument(), State,
----------------
Do we need this `+` to force conversion to function pointer? Is it possible to 
fix `CaseOf` so it works with lambdas or is that not desirable?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121602/new/

https://reviews.llvm.org/D121602

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to