xazax.hun added inline comments.
================ Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:64 + callee(cxxMethodDecl(ofClass(optionalClass()))), + unless(hasArgument(0, *Ignorable))); + return cxxOperatorCallExpr(hasOverloadedOperatorName(operator_name), ---------------- Maybe removing the duplication with something like: `auto Exception = Ignorable? expr() : expr(unless(...))` and use it in the matcher? ================ Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:301 + cxxOperatorCallExpr(anyOf(hasOverloadedOperatorName("->"), + hasOverloadedOperatorName("*")), + unless(hasArgument(0, expr(hasOptionalType()))))))); ---------------- It is probably rarely used, but one could use `std::unique_ptr` with an array of `std::optional`s and use `operator[]` to access the optional. 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