17 #ifndef LLVM_CLANG_ASTMATCHERS_DYNAMIC_REGISTRY_H
18 #define LLVM_CLANG_ASTMATCHERS_DYNAMIC_REGISTRY_H
23 #include "llvm/ADT/ArrayRef.h"
24 #include "llvm/ADT/Optional.h"
25 #include "llvm/ADT/StringRef.h"
28 namespace ast_matchers {
41 : TypedText(TypedText), MatcherDecl(MatcherDecl),
42 Specificity(Specificity) {}
90 static std::vector<MatcherCompletion>
133 #endif // LLVM_CLANG_AST_MATCHERS_DYNAMIC_REGISTRY_H
static VariantMatcher constructBoundMatcher(MatcherCtor Ctor, SourceRange NameRange, StringRef BindID, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry and bind it.
static std::vector< MatcherCompletion > getMatcherCompletions(ArrayRef< ArgKind > AcceptedTypes)
Compute the list of completions that match any of AcceptedTypes.
bool operator==(const MatcherCompletion &Other) const
Matcher descriptor interface.
static std::vector< ArgKind > getAcceptedCompletionTypes(llvm::ArrayRef< std::pair< MatcherCtor, unsigned >> Context)
Compute the list of completion types for Context.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
std::string MatcherDecl
The "declaration" of the matcher, with type information.
static llvm::Optional< MatcherCtor > lookupMatcherCtor(StringRef MatcherName)
Look up a matcher in the registry by name,.
const internal::MatcherDescriptor * MatcherCtor
Diagnostics class to manage error messages.
Helper class to manage error messages.
unsigned Specificity
Value corresponding to the "specificity" of the converted matcher.
std::string TypedText
The text to type to select this matcher.
MatcherCompletion(StringRef TypedText, StringRef MatcherDecl, unsigned Specificity)
A variant matcher object.
static VariantMatcher constructMatcher(MatcherCtor Ctor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry.