[llvm-branch-commits] [clang] [FlowSensitive] [StatusOr] [6/N] Support pointer comparison (PR #163875)
Jan Voung via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 22 10:07:26 PDT 2025
================
@@ -168,6 +168,18 @@ static auto isNotOkStatusCall() {
"::absl::UnimplementedError", "::absl::UnknownError"))));
}
+static auto isPointerComparisonOperatorCall(std::string operator_name) {
+ using namespace ::clang::ast_matchers; // NOLINT: Too many names
+ return binaryOperator(
+ hasOperatorName(operator_name),
+ hasLHS(
+ anyOf(hasType(hasCanonicalType(pointerType(pointee(statusOrType())))),
----------------
jvoung wrote:
can the anyOf be deeper for just the (statusOrType, statusType) part? (if that helps matching performance)?
https://github.com/llvm/llvm-project/pull/163875
More information about the llvm-branch-commits
mailing list