llvm/clang/lib/ASTMatchers/Dynamic/Registry.cpp

//===- Registry.cpp - Matcher registry ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
/// \file
/// Registry map populated at static initialization time.
//
//===----------------------------------------------------------------------===//

#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 {};

} // namespace

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)

/// Generate a registry map with all the known matchers.
/// Please keep sorted alphabetically!
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) {}

// static
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) {}

} // namespace dynamic
} // namespace ast_matchers
} // namespace clang