llvm/clang-tools-extra/clang-tidy/bugprone/TaggedUnionMemberCountCheck.cpp

//===--- TaggedUnionMemberCountCheck.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 "TaggedUnionMemberCountCheck.h"
#include "../utils/OptionsUtils.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"

usingnamespaceclang::ast_matchers;

namespace clang::tidy::bugprone {

static constexpr llvm::StringLiteral StrictModeOptionName =;
static constexpr llvm::StringLiteral EnableCountingEnumHeuristicOptionName =;
static constexpr llvm::StringLiteral CountingEnumPrefixesOptionName =;
static constexpr llvm::StringLiteral CountingEnumSuffixesOptionName =;

static constexpr bool StrictModeOptionDefaultValue =;
static constexpr bool EnableCountingEnumHeuristicOptionDefaultValue =;
static constexpr llvm::StringLiteral CountingEnumPrefixesOptionDefaultValue =;
static constexpr llvm::StringLiteral CountingEnumSuffixesOptionDefaultValue =;

static constexpr llvm::StringLiteral RootMatchBindName =;
static constexpr llvm::StringLiteral UnionMatchBindName =;
static constexpr llvm::StringLiteral TagMatchBindName =;

namespace {

AST_MATCHER_P2(RecordDecl, fieldCountOfKindIsOne,
               ast_matchers::internal::Matcher<FieldDecl>, InnerMatcher,
               StringRef, BindName) {}

} // namespace

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

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

void TaggedUnionMemberCountCheck::registerMatchers(MatchFinder *Finder) {}

bool TaggedUnionMemberCountCheck::isCountingEnumLikeName(StringRef Name) const {}

std::pair<const std::size_t, const EnumConstantDecl *>
TaggedUnionMemberCountCheck::getNumberOfEnumValues(const EnumDecl *ED) {}

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

} // namespace clang::tidy::bugprone