clang 22.0.0git
ASTMatchersInternal.cpp File Reference
#include "clang/ASTMatchers/ASTMatchersInternal.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/LLVM.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstddef>
#include <optional>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
namespace  clang::ast_matchers
namespace  clang::ast_matchers::internal

Functions

 clang::ast_matchers::AST_MATCHER_P (ObjCMessageExpr, hasAnySelectorMatcher, std::vector< std::string >, Matches)
static bool clang::ast_matchers::internal::notUnaryOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
static bool clang::ast_matchers::internal::allOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
static bool clang::ast_matchers::internal::eachOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
static bool clang::ast_matchers::internal::anyOfVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
static bool clang::ast_matchers::internal::optionallyVariadicOperator (const DynTypedNode &DynNode, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, ArrayRef< DynTypedMatcher > InnerMatchers)
bool clang::ast_matchers::internal::matchesAnyBase (const CXXRecordDecl &Node, const Matcher< CXXBaseSpecifier > &BaseSpecMatcher, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder)
static std::vector< std::string > clang::ast_matchers::internal::vectorFromRefs (ArrayRef< const StringRef * > NameRefs)
Matcher< NamedDeclclang::ast_matchers::internal::hasAnyNameFunc (ArrayRef< const StringRef * > NameRefs)
Matcher< ObjCMessageExprclang::ast_matchers::internal::hasAnySelectorFunc (ArrayRef< const StringRef * > NameRefs)
HasOpNameMatcher clang::ast_matchers::internal::hasAnyOperatorNameFunc (ArrayRef< const StringRef * > NameRefs)
HasOverloadOpNameMatcher clang::ast_matchers::internal::hasAnyOverloadedOperatorNameFunc (ArrayRef< const StringRef * > NameRefs)
static bool clang::ast_matchers::internal::consumeNameSuffix (StringRef &FullName, StringRef Suffix)
static StringRef clang::ast_matchers::internal::getNodeName (const NamedDecl &Node, llvm::SmallString< 128 > &Scratch)
static StringRef clang::ast_matchers::internal::getNodeName (const RecordDecl &Node, llvm::SmallString< 128 > &Scratch)
static StringRef clang::ast_matchers::internal::getNodeName (const NamespaceDecl &Node, llvm::SmallString< 128 > &Scratch)
static bool clang::ast_matchers::internal::isTokenAtLoc (const SourceManager &SM, const LangOptions &LangOpts, StringRef Text, SourceLocation Loc)
static std::optional< SourceLocationclang::ast_matchers::internal::getExpansionLocOfMacroRecursive (StringRef MacroName, SourceLocation Loc, const ASTContext &Context, llvm::DenseSet< SourceLocation > &CheckedLocations)
std::optional< SourceLocationclang::ast_matchers::internal::getExpansionLocOfMacro (StringRef MacroName, SourceLocation Loc, const ASTContext &Context)
std::shared_ptr< llvm::Regex > clang::ast_matchers::internal::createAndVerifyRegex (StringRef Regex, llvm::Regex::RegexFlags Flags, StringRef MatcherID)
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER_DEF (hasElementType, AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType, ComplexType))
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER_DEF (hasValueType, AST_POLYMORPHIC_SUPPORTED_TYPES(AtomicType))
 clang::ast_matchers::AST_TYPELOC_TRAVERSE_MATCHER_DEF (pointee, AST_POLYMORPHIC_SUPPORTED_TYPES(BlockPointerType, MemberPointerType, PointerType, ReferenceType, ObjCObjectPointerType))

Variables

const internal::VariadicDynCastAllOfMatcher< TypeLoc, QualifiedTypeLocclang::ast_matchers::qualifiedTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, PointerTypeLocclang::ast_matchers::pointerTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, ReferenceTypeLocclang::ast_matchers::referenceTypeLoc
const internal::VariadicDynCastAllOfMatcher< TypeLoc, TemplateSpecializationTypeLocclang::ast_matchers::templateSpecializationTypeLoc
const internal::VariadicFunction< internal::HasOpNameMatcher, StringRef, internal::hasAnyOperatorNameFuncclang::ast_matchers::hasAnyOperatorName = {}
const internal::VariadicAllOfMatcher< NestedNameSpecifierclang::ast_matchers::nestedNameSpecifier
const internal::VariadicAllOfMatcher< NestedNameSpecifierLocclang::ast_matchers::nestedNameSpecifierLoc
const internal::VariadicAllOfMatcher< Attrclang::ast_matchers::attr
const internal::VariadicDynCastAllOfMatcher< Stmt, CUDAKernelCallExprclang::ast_matchers::cudaKernelCallExpr
const AstTypeMatcher< BuiltinTypeclang::ast_matchers::builtinType
const AstTypeMatcher< ArrayTypeclang::ast_matchers::arrayType
const AstTypeMatcher< ComplexTypeclang::ast_matchers::complexType
const AstTypeMatcher< ConstantArrayTypeclang::ast_matchers::constantArrayType
const AstTypeMatcher< DeducedTemplateSpecializationType > clang::ast_matchers::deducedTemplateSpecializationType
const AstTypeMatcher< DependentSizedArrayTypeclang::ast_matchers::dependentSizedArrayType
const AstTypeMatcher< DependentSizedExtVectorTypeclang::ast_matchers::dependentSizedExtVectorType
const AstTypeMatcher< IncompleteArrayTypeclang::ast_matchers::incompleteArrayType
const AstTypeMatcher< VariableArrayTypeclang::ast_matchers::variableArrayType
const AstTypeMatcher< AtomicTypeclang::ast_matchers::atomicType
const AstTypeMatcher< AutoType > clang::ast_matchers::autoType
const AstTypeMatcher< DecltypeType > clang::ast_matchers::decltypeType
const AstTypeMatcher< FunctionTypeclang::ast_matchers::functionType
const AstTypeMatcher< FunctionProtoTypeclang::ast_matchers::functionProtoType
const AstTypeMatcher< ParenTypeclang::ast_matchers::parenType
const AstTypeMatcher< BlockPointerTypeclang::ast_matchers::blockPointerType
const AstTypeMatcher< MacroQualifiedTypeclang::ast_matchers::macroQualifiedType
const AstTypeMatcher< MemberPointerTypeclang::ast_matchers::memberPointerType
const AstTypeMatcher< PointerTypeclang::ast_matchers::pointerType
const AstTypeMatcher< ObjCObjectPointerTypeclang::ast_matchers::objcObjectPointerType
const AstTypeMatcher< ReferenceTypeclang::ast_matchers::referenceType
const AstTypeMatcher< LValueReferenceTypeclang::ast_matchers::lValueReferenceType
const AstTypeMatcher< RValueReferenceTypeclang::ast_matchers::rValueReferenceType
const AstTypeMatcher< TypedefTypeclang::ast_matchers::typedefType
const AstTypeMatcher< EnumType > clang::ast_matchers::enumType
const AstTypeMatcher< TemplateSpecializationType > clang::ast_matchers::templateSpecializationType
const AstTypeMatcher< UnaryTransformType > clang::ast_matchers::unaryTransformType
const AstTypeMatcher< RecordType > clang::ast_matchers::recordType
const AstTypeMatcher< TagType > clang::ast_matchers::tagType
const AstTypeMatcher< UsingTypeclang::ast_matchers::usingType
const AstTypeMatcher< SubstTemplateTypeParmType > clang::ast_matchers::substTemplateTypeParmType
const AstTypeMatcher< TemplateTypeParmType > clang::ast_matchers::templateTypeParmType
const AstTypeMatcher< InjectedClassNameType > clang::ast_matchers::injectedClassNameType
const AstTypeMatcher< DecayedTypeclang::ast_matchers::decayedType
const AstTypeMatcher< DependentNameType > clang::ast_matchers::dependentNameType
const internal::VariadicDynCastAllOfMatcher< Stmt, OMPExecutableDirectiveclang::ast_matchers::ompExecutableDirective
const internal::VariadicDynCastAllOfMatcher< OMPClause, OMPDefaultClauseclang::ast_matchers::ompDefaultClause