llvm/clang-tools-extra/clangd/TidyProvider.cpp

//===--- TidyProvider.cpp - create options for running 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 "TidyProvider.h"
#include "../clang-tidy/ClangTidyModuleRegistry.h"
#include "../clang-tidy/ClangTidyOptions.h"
#include "Config.h"
#include "support/FileCache.h"
#include "support/Logger.h"
#include "support/Path.h"
#include "support/ThreadsafeFS.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/SourceMgr.h"
#include <memory>
#include <optional>

namespace clang {
namespace clangd {
namespace {

// Access to config from a .clang-tidy file, caching IO and parsing.
class DotClangTidyCache : private FileCache {};

// Access to combined config from .clang-tidy files governing a source file.
// Each config file is cached and the caches are shared for affected sources.
//
// FIXME: largely duplicates config::Provider::fromAncestorRelativeYAMLFiles.
// Potentially useful for compile_commands.json too. Extract?
class DotClangTidyTree {};

} // namespace

static void mergeCheckList(std::optional<std::string> &Checks,
                           llvm::StringRef List) {}

TidyProviderRef provideEnvironment() {}

TidyProviderRef provideDefaultChecks() {}

TidyProvider addTidyChecks(llvm::StringRef Checks,
                           llvm::StringRef WarningsAsErrors) {}

TidyProvider disableUnusableChecks(llvm::ArrayRef<std::string> ExtraBadChecks) {}

TidyProviderRef provideClangdConfig() {}

TidyProvider provideClangTidyFiles(ThreadsafeFS &TFS) {}

TidyProvider combine(std::vector<TidyProvider> Providers) {}

tidy::ClangTidyOptions getTidyOptionsForFile(TidyProviderRef Provider,
                                             llvm::StringRef Filename) {}

bool isRegisteredTidyCheck(llvm::StringRef Check) {}

std::optional<bool> isFastTidyCheck(llvm::StringRef Check) {}

} // namespace clangd
} // namespace clang