[all-commits] [llvm/llvm-project] 60e5ec: [ASTMatchers] Fix matching `CXXOperatorCallExpr` o...
Eric Li via All-commits
all-commits at lists.llvm.org
Thu May 22 07:32:50 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 60e5ecd0431c0c62574f063f509dd3dd31cb0647
https://github.com/llvm/llvm-project/commit/60e5ecd0431c0c62574f063f509dd3dd31cb0647
Author: Eric Li <li.zhe.hua at gmail.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M clang/include/clang/ASTMatchers/ASTMatchersInternal.h
M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
Log Message:
-----------
[ASTMatchers] Fix matching `CXXOperatorCallExpr` of `->` (#139994)
The `->` operator does not have a corresponding `UnaryOperatorKind`, and
so was unsupported by the `hasOperatorName` and `hasUnaryOperand`
matchers.
Instead of trying to determine the equivalent unary or binary operator
and then deriving the opcode string, we consult `OperatorKinds.def`
directly (through `getOperatorSpelling`).
For `hasUnaryOperand` support, we special case the arrow operator
specifically.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list