[llvm-branch-commits] [clang] [FlowSensitive] [StatusOr] [8/N] Support value ctor and assignment (PR #163894)
Florian Mayer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 24 15:58:19 PDT 2025
================
@@ -177,6 +177,27 @@ static auto isPointerComparisonOperatorCall(std::string operator_name) {
pointee(anyOf(statusOrType(), statusType())))))));
}
+static auto isStatusOrValueAssignmentCall() {
+ using namespace ::clang::ast_matchers; // NOLINT: Too many names
+ return cxxOperatorCallExpr(
+ hasOverloadedOperatorName("="),
+ callee(cxxMethodDecl(ofClass(statusOrClass()))),
+ hasArgument(1, anyOf(hasType(hasUnqualifiedDesugaredType(
+ type(equalsBoundNode("T")))),
+ nullPointerConstant())));
----------------
fmayer wrote:
added comment for now. we can revisit improving this
https://github.com/llvm/llvm-project/pull/163894
More information about the llvm-branch-commits
mailing list