10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_MATCHERS_H
13 #include "clang/ASTMatchers/ASTMatchers.h"
21 return Node.isRelationalOp();
25 return Node.isEqualityOp();
29 return Node.isComparisonOp();
33 llvm::Optional<bool> IsExpensive =
35 return IsExpensive && *IsExpensive;
40 Node,
Finder->getASTContext());
45 using namespace ast_matchers;
46 return referenceType(pointee(qualType(isConstQualified())));
53 #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)