llvm/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp

//===---------- TransformerClangTidyCheck.cpp - clang-tidy ----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "TransformerClangTidyCheck.h"
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
#include <optional>

namespace clang::tidy::utils {
RewriteRuleWith;

#ifndef NDEBUG
static bool hasGenerator(const transformer::Generator<std::string> &G) {
  return G != nullptr;
}
#endif

static void verifyRule(const RewriteRuleWith<std::string> &Rule) {}

// If a string unintentionally containing '%' is passed as a diagnostic, Clang
// will claim the string is ill-formed and assert-fail. This function escapes
// such strings so they can be safely used in diagnostics.
std::string escapeForDiagnostic(std::string ToEscape) {}

TransformerClangTidyCheck::TransformerClangTidyCheck(StringRef Name,
                                                     ClangTidyContext *Context)
    :{}

// This constructor cannot dispatch to the simpler one (below), because, in
// order to get meaningful results from `getLangOpts` and `Options`, we need the
// `ClangTidyCheck()` constructor to have been called. If we were to dispatch,
// we would be accessing `getLangOpts` and `Options` before the underlying
// `ClangTidyCheck` instance was properly initialized.
TransformerClangTidyCheck::TransformerClangTidyCheck(
    std::function<std::optional<RewriteRuleWith<std::string>>(
        const LangOptions &, const OptionsView &)>
        MakeRule,
    StringRef Name, ClangTidyContext *Context)
    :{}

TransformerClangTidyCheck::TransformerClangTidyCheck(
    RewriteRuleWith<std::string> R, StringRef Name, ClangTidyContext *Context)
    :{}

void TransformerClangTidyCheck::setRule(
    transformer::RewriteRuleWith<std::string> R) {}

void TransformerClangTidyCheck::registerPPCallbacks(
    const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {}

void TransformerClangTidyCheck::registerMatchers(
    ast_matchers::MatchFinder *Finder) {}

void TransformerClangTidyCheck::check(
    const ast_matchers::MatchFinder::MatchResult &Result) {}

void TransformerClangTidyCheck::storeOptions(
    ClangTidyOptions::OptionMap &Opts) {}

} // namespace clang::tidy::utils