This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Add binaryOperation matcher
ClosedPublic

Authored by steveire on Jan 5 2021, 3:32 PM.

Details

Summary

This is a simple utility which allows matching on binaryOperator and
cxxOperatorCallExpr. It can also be extended to support
cxxRewrittenBinaryOperator.

Diff Detail

Event Timeline

steveire requested review of this revision.Jan 5 2021, 3:32 PM
steveire created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2021, 3:32 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman added inline comments.Jan 11 2021, 6:53 AM
clang/include/clang/ASTMatchers/ASTMatchers.h
2735
2781

Missing changes to Registry.cpp to expose this to clang-query?

steveire marked 2 inline comments as done.Jan 14 2021, 12:41 PM
aaron.ballman accepted this revision.Jan 15 2021, 5:00 AM

LGTM aside from some minor NFC improvements.

clang/lib/ASTMatchers/Dynamic/Marshallers.h
957
964–968
This revision is now accepted and ready to land.Jan 15 2021, 5:00 AM
This revision was landed with ongoing or failed builds.Jan 16 2021, 5:44 AM
This revision was automatically updated to reflect the committed changes.