#include "clang/ASTMatchers/Dynamic/Registry.h"
#include "Marshallers.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/ASTMatchers/Dynamic/Diagnostics.h"
#include "clang/ASTMatchers/Dynamic/VariantValue.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <iterator>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <utility>
#include <vector>
namespace clang {
namespace ast_matchers {
namespace dynamic {
namespace {
MatcherDescriptor;
ConstructorMap;
class RegistryMaps { … };
}
void RegistryMaps::registerMatcher(
StringRef MatcherName, std::unique_ptr<MatcherDescriptor> Callback) { … }
#define REGISTER_MATCHER(name) …
#define REGISTER_MATCHER_OVERLOAD(name) …
#define SPECIFIC_MATCHER_OVERLOAD(name, Id) …
#define MATCHER_OVERLOAD_ENTRY(name, Id) …
#define REGISTER_OVERLOADED_2(name) …
#define REGISTER_REGEX_MATCHER(name) …
RegistryMaps::RegistryMaps() { … }
RegistryMaps::~RegistryMaps() = default;
static llvm::ManagedStatic<RegistryMaps> RegistryData;
ASTNodeKind Registry::nodeMatcherType(MatcherCtor Ctor) { … }
internal::MatcherDescriptorPtr::MatcherDescriptorPtr(MatcherDescriptor *Ptr)
: … { … }
internal::MatcherDescriptorPtr::~MatcherDescriptorPtr() { … }
bool Registry::isBuilderMatcher(MatcherCtor Ctor) { … }
internal::MatcherDescriptorPtr
Registry::buildMatcherCtor(MatcherCtor Ctor, SourceRange NameRange,
ArrayRef<ParserValue> Args, Diagnostics *Error) { … }
std::optional<MatcherCtor> Registry::lookupMatcherCtor(StringRef MatcherName) { … }
static llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
const std::set<ASTNodeKind> &KS) { … }
std::vector<ArgKind> Registry::getAcceptedCompletionTypes(
ArrayRef<std::pair<MatcherCtor, unsigned>> Context) { … }
std::vector<MatcherCompletion>
Registry::getMatcherCompletions(ArrayRef<ArgKind> AcceptedTypes) { … }
VariantMatcher Registry::constructMatcher(MatcherCtor Ctor,
SourceRange NameRange,
ArrayRef<ParserValue> Args,
Diagnostics *Error) { … }
VariantMatcher Registry::constructBoundMatcher(MatcherCtor Ctor,
SourceRange NameRange,
StringRef BindID,
ArrayRef<ParserValue> Args,
Diagnostics *Error) { … }
}
}
}