[ASTMatchers] Added BinaryOperator hasOperands matcher
authorNathan James <n.james93@hotmail.co.uk>
Sat, 16 May 2020 01:00:33 +0000 (02:00 +0100)
committerNathan James <n.james93@hotmail.co.uk>
Sun, 17 May 2020 18:54:14 +0000 (19:54 +0100)
commit74bcb00e00f3ef971e4c584a124e99289f2ebf34
tree06134a7fde3af013bbbdb8bae4dfd73c1b223d32
parent8120562ba6180abf72b2005e27ffc85e42787618
[ASTMatchers] Added BinaryOperator hasOperands matcher

Summary: Adds a matcher called `hasOperands` for `BinaryOperator`'s when you need to match both sides but the order isn't important, usually on commutative operators.

Reviewers: klimek, aaron.ballman, gribozavr2, alexfh

Reviewed By: aaron.ballman

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80054
clang/docs/LibASTMatchersReference.html
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/lib/ASTMatchers/Dynamic/Registry.cpp
clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp