clang  14.0.0git
Namespaces | Functions
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/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/IntrusiveRefCntPtr.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for ASTMatchersInternal.cpp:

Go to the source code of this file.

Namespaces

 clang
 
 clang::ast_matchers
 
 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::stringclang::ast_matchers::internal::vectorFromRefs (ArrayRef< const StringRef * > NameRefs)
 
Matcher< NamedDecl > clang::ast_matchers::internal::hasAnyNameFunc (ArrayRef< const StringRef * > NameRefs)
 
Matcher< ObjCMessageExpr > clang::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)
 
llvm::Optional< SourceLocation > clang::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))
 

Variable Documentation

◆ IsFullyQualified

bool IsFullyQualified

Definition at line 564 of file ASTMatchersInternal.cpp.

◆ P

StringRef P

Definition at line 563 of file ASTMatchersInternal.cpp.

Referenced by clang::Sema::ActOnOpenMPTileDirective(), clang::Sema::ActOnOpenMPUnrollDirective(), clang::Sema::ActOnTemplateParameterList(), clang::syntax::MutationsImpl::addAfter(), addAssociatedClassesAndNamespaces(), clang::driver::toolchains::DarwinClang::AddCCKextLibArgs(), clang::driver::toolchains::VEToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangCXXStdlibIncludeArgs(), clang::driver::ToolChain::AddClangCXXStdlibIsystemArgs(), clang::driver::toolchains::PPCLinuxToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::VEToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::AIX::AddClangSystemIncludeArgs(), clang::driver::toolchains::MinGW::AddClangSystemIncludeArgs(), clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangSystemIncludeArgs(), addConstevalToLambdaDeclSpecifier(), addConstexprToLambdaDeclSpecifier(), addContextEdges(), addContextSensitiveTypeNullability(), clang::driver::CudaInstallationDetector::AddCudaIncludeArgs(), clang::driver::toolchains::DarwinClang::AddCXXStdlibLibArgs(), AddFunctionParameterChunks(), clang::driver::RocmInstallationDetector::AddHIPIncludeArgs(), clang::driver::toolchains::CloudABI::addLibCxxIncludePaths(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::toolchains::MachO::AddLinkRuntimeLib(), AddOverloadParameterChunks(), clang::interp::Block::addPointer(), AddTemplateParameterChunks(), clang::ASTRecordWriter::AddTemplateParameterList(), AdoptTemplateParameterList(), clang::interp::ByteCodeExprGen< Emitter >::allocateLocal(), clang::interp::ByteCodeExprGen< Emitter >::allocateLocalPrimitive(), alreadyExecutedAtLeastOneLoopIteration(), clang::ApplyHeaderSearchOptions(), clang::BalancedDelimiterTracker::BalancedDelimiterTracker(), buildMultiCharMask(), clang::interp::ByteCodeEmitter::ByteCodeEmitter(), canEmitDelegateCallArgs(), llvm::GraphTraits< clang::CallGraph * >::CGGetValue(), llvm::GraphTraits< const clang::CallGraph * >::CGGetValue(), CheckArrayDesignatorSyntax(), CheckAvailabilitySpecList(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), checkDestructorsRequired(), checkExtensionProperty(), clang::ento::ConstraintManager::checkNull(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckVarTemplateId(), clang::ento::PathDiagnosticSpotPiece::classof(), clang::ento::PathDiagnosticEventPiece::classof(), clang::ento::PathDiagnosticCallPiece::classof(), clang::ento::PathDiagnosticControlFlowPiece::classof(), clang::ento::PathDiagnosticMacroPiece::classof(), clang::ento::PathDiagnosticNotePiece::classof(), clang::ento::PathDiagnosticPopUpPiece::classof(), clang::driver::toolchains::CloudABI::CloudABI(), clang::ColonProtectionRAIIObject::ColonProtectionRAIIObject(), clang::threadSafety::til::EqualsComparator::comparePointers(), clang::threadSafety::til::MatchComparator::comparePointers(), clang::computeDependence(), computeNodeID(), computeNodeSize(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::ento::bugreporter::StoreHandler::constructNote(), clang::BalancedDelimiterTracker::consumeClose(), clang::BalancedDelimiterTracker::consumeOpen(), clang::TemplateTypeParmDecl::Create(), clang::NonTypeTemplateParmDecl::Create(), clang::TemplateTemplateParmDecl::Create(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), clang::OMPDeclarativeDirective< ValueDecl >::createDirective(), clang::OMPExecutableDirective::createDirective(), clang::OMPDeclarativeDirective< ValueDecl >::createEmptyDirective(), clang::OMPExecutableDirective::createEmptyDirective(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), clang::CreateFrontendBaseAction(), clang::interp::Program::createGlobal(), createMakeIntegerSeqParameterList(), createRules(), createThreadFlow(), clang::interp::DeadBlock::DeadBlock(), clang::Sema::DeclareImplicitDeductionGuides(), clang::interp::Program::DeclScope::DeclScope(), clang::Sema::DeduceTemplateArguments(), diagnoseDynamicExceptionSpecification(), diagnoseRedundantPropertyNullability(), clang::driver::Driver::Driver(), clang::Decl::dump(), clang::Stmt::dump(), clang::Decl::dumpColor(), clang::Stmt::dumpColor(), emit(), clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction(), emitMappingInformation(), emitNonContiguousDescriptor(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), clang::Parser::ObjCTypeParamListScope::enter(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), Evaluate(), extendPath(), clang::CodeGen::CGDebugInfo::finalize(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::ClassTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::VarTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::ObjCContainerDecl::FindPropertyDeclaration(), clang::ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass(), FixDigraph(), clang::driver::toolchains::Fuchsia::Fuchsia(), functionDeclHasDefaultArgument(), functionHasPassObjectSizeParams(), generateVisitorsDiagnostics(), getAlignmentAndOffsetFromBinAddOrSub(), clang::Type::getAsAdjusted(), clang::getAsNamedDecl(), llvm::PointerLikeTypeTraits< clang::Expr * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::Type * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::ExtQuals * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::OpaquePtr< T > >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::DeclGroupRef >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::CanQual< T > >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::CanonicalDeclPtr< decl_type > >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::LazyGenerationalUpdatePtr< Owner, T, Update > >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::DeclarationName >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::Selector >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::IdentifierInfo * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< const clang::IdentifierInfo * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits<::clang::NamedDecl * >::getAsVoidPointer(), llvm::PointerLikeTypeTraits< clang::QualType >::getAsVoidPointer(), getBaseAlignmentAndOffsetFromLValue(), getBaseAlignmentAndOffsetFromPtr(), clang::ento::ExplodedNode::getCFGBlock(), getCN(), clang::driver::types::getCompilationPhases(), clang::driver::ToolChain::getCompilerRT(), clang::ento::BugReporterVisitor::getDefaultEndPath(), clang::TemplateArgument::getDependence(), llvm::DenseMapInfo< clang::CanonicalDeclPtr< decl_type > >::getEmptyKey(), clang::serialization::InputFile::getFile(), clang::DeclarationName::getFromOpaqueInteger(), clang::ActionResult< PtrTy, true >::getFromOpaquePointer(), clang::OpaquePtr< TemplateName >::getFromOpaquePtr(), clang::GlobalDecl::getFromOpaquePtr(), clang::DeclarationName::getFromOpaquePtr(), llvm::PointerLikeTypeTraits< clang::Expr * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::Type * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< ::clang::ExtQuals * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::TypeInfoLValue >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::DynamicAllocLValue >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::OpaquePtr< T > >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::DeclGroupRef >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::CanQual< T > >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::CanonicalDeclPtr< decl_type > >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::LazyGenerationalUpdatePtr< Owner, T, Update > >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::DeclarationName >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::Selector >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::IdentifierInfo * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< const clang::IdentifierInfo * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits<::clang::NamedDecl * >::getFromVoidPointer(), llvm::PointerLikeTypeTraits< clang::QualType >::getFromVoidPointer(), clang::AnalysisDeclContext::getFunctionName(), llvm::DenseMapInfo< clang::CanonicalDeclPtr< decl_type > >::getHashValue(), clang::ento::StackHintGeneratorForSymbol::getMessage(), clang::TemplateParameterList::getMinRequiredArguments(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::VarTemplateDecl::getPartialSpecializations(), clang::ento::BasicValueFactory::getPersistentSValPair(), clang::ento::BasicValueFactory::getPersistentSValWithData(), clang::interp::ByteCodeExprGen< Emitter >::getRecord(), clang::driver::Driver::GetResourcesPath(), getRoot(), clang::driver::ToolChain::getRuntimePath(), getSelectorTableImpl(), clang::driver::ToolChain::getStdlibPath(), clang::ento::ExplodedNode::getStmtForDiagnostics(), clang::ASTContext::getSubstTemplateTypeParmPackType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), llvm::DenseMapInfo< clang::CanonicalDeclPtr< decl_type > >::getTombstoneKey(), clang::ento::BasicValueFactory::getValue(), getValueDeclFromSExpr(), clang::VarDecl::hasInit(), clang::FunctionDecl::hasOneParamOrDefaultArgs(), clang::TemplateParameterList::hasParameterPack(), clang::ObjCContainerDecl::HasUserDeclaredSetterMethod(), clang::Sema::hasVisibleDefaultArgument(), clang::ExternalASTSource::incrementGeneration(), clang::Parser::AngleBracketTracker::Loc::isActive(), clang::Parser::AngleBracketTracker::Loc::isActiveOrNested(), clang::ParentMap::isConsumedExpr(), clang::comments::Sema::isFunctionOrBlockPointerVarLikeDecl(), isInitializationOfVar(), clang::CXXMethodDecl::isLambdaStaticInvoker(), isMapModifier(), isMapType(), clang::Scope::isOpenMPLoopScope(), clang::interp::Context::isPotentialConstantExpr(), IsStructurallyEquivalent(), clang::sema::AnalysisBasedWarnings::IssueWarnings(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), clang::CompilerInstance::LoadRequestedPlugins(), clang::OpaquePtr< TemplateName >::make(), clang::UnionOpaquePtr< TemplateName >::make(), clang::ento::ProgramStateTrait< T >::MakeData(), clang::MangleContext::mangleMSGuidDecl(), llvm::yaml::MappingTraits< Param >::mapping(), llvm::yaml::MappingTraits< Property >::mapping(), MarkUsedTemplateParameters(), clang::Sema::MergeVarDeclExceptionSpecs(), NeedsInstantiationAsFunctionType(), clang::ast_matchers::dynamic::Parser::ScopedContextEntry::nextArg(), onlyWhitespaceOnLineBefore(), clang::interp::operator<<(), clang::interp::Pointer::operator=(), clang::UnionOpaquePtr< TemplateName >::operator=(), clang::ParenBraceBracketBalancer::ParenBraceBracketBalancer(), parseContextScore(), parseDeclareSimdClauses(), ParseHeaderSearchArgs(), parseMapType(), parseOpenMPDirectiveKind(), parseOpenMPReductionId(), parseOpenMPSimpleClause(), parsePair(), ParseReductionId(), parseSingle(), clang::ParsingOpenMPDirectiveRAII::ParsingOpenMPDirectiveRAII(), clang::interp::Pointer::Pointer(), print(), clang::TemplateArgument::print(), clang::Stmt::printPretty(), clang::NamedDecl::printQualifiedName(), clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printSExpr(), clang::MSGuidDecl::Profile(), clang::SubstTemplateTypeParmPackType::Profile(), clang::ProgramPoint::ProgramPoint(), PushProtocolProperties(), clang::comments::TextTokenRetokenizer::putBackLeftoverTokens(), ReadArg(), readULEB(), readULEBKeyDataLength(), clang::CodeGen::CGDebugInfo::remapDIPath(), clang::syntax::MutationsImpl::remove(), clang::interp::Block::removePointer(), clang::syntax::MutationsImpl::replace(), clang::ColonProtectionRAIIObject::restore(), clang::ParsingOpenMPDirectiveRAII::restore(), clang::ast_matchers::dynamic::Parser::ScopedContextEntry::ScopedContextEntry(), clang::OpaquePtr< TemplateName >::set(), clang::CapturedDecl::setContextParam(), clang::FunctionDecl::setHasInheritedPrototype(), clang::FunctionDecl::setHasWrittenPrototype(), clang::Sema::SetLateTemplateParser(), clang::CodeGen::LoopInfoStack::setMustProgress(), clang::CapturedDecl::setParam(), clang::TemplateParmPosition::setPosition(), clang::Preprocessor::setPredefines(), clang::ObjCProtocolExpr::setProtocol(), clang::FunctionDecl::setPure(), clang::HeaderSearch::SetSystemHeaderPrefixes(), clang::StmtIteratorBase::setVAPtr(), SortAndUniqueProtocols(), clang::Sema::startLambdaDefinition(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TemplateDeclInstantiator::SubstTemplateParams(), clang::TemplateParameterList::TemplateParameterList(), clang::comments::TextTokenRetokenizer::TextTokenRetokenizer(), clang::ast_matchers::traverse(), tryConsumeLambdaSpecifierToken(), updateExecutedLinesWithDiagnosticPieces(), updateOutParameters(), clang::threadSafety::CapabilityExpr::valueDecl(), clang::ASTDeclWriter::VisitBlockDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::interp::ByteCodeExprGen< Emitter >::visitDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTDeclWriter::VisitIndirectFieldDecl(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::TrackConstraintBRVisitor::VisitNode(), clang::ento::NilReceiverBRVisitor::VisitNode(), StoreSiteFinder::VisitNode(), clang::ASTDeclWriter::VisitObjCInterfaceDecl(), clang::ASTDeclWriter::VisitObjCMethodDecl(), clang::ento::ConditionBRVisitor::VisitTrueTest(), clang::IdentifierResolver::IdDeclInfoMap::~IdDeclInfoMap(), clang::ParenBraceBracketBalancer::~ParenBraceBracketBalancer(), and clang::ast_matchers::dynamic::Parser::ScopedContextEntry::~ScopedContextEntry().