10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
14 #include "clang/ASTMatchers/ASTMatchers.h"
21 return Node.isRelationalOp();
24 AST_MATCHER(BinaryOperator, isEqualityOperator) {
return Node.isEqualityOp(); }
27 return Node.isComparisonOp();
31 llvm::Optional<bool> IsExpensive =
33 return IsExpensive && *IsExpensive;
38 Node,
Finder->getASTContext());
43 using namespace ast_matchers;
44 return referenceType(pointee(qualType(isConstQualified())));
51 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
std::unique_ptr< ast_matchers::MatchFinder > Finder
AST_MATCHER_FUNCTION(ast_matchers::TypeMatcher, isReferenceToConst)
bool recordIsTriviallyDefaultConstructible(const RecordDecl &RecordDecl, const ASTContext &Context)
Returns true if RecordDecl is trivially default constructible.
llvm::Optional< bool > isExpensiveToCopy(QualType Type, const ASTContext &Context)
Returns true if Type is expensive to copy.
bool isTriviallyDefaultConstructible(QualType Type, const ASTContext &Context)
Returns true if Type is trivially default constructible.
AST_MATCHER(BinaryOperator, isRelationalOperator)