llvm/clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp

//===--- VirtualClassDestructorCheck.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 "VirtualClassDestructorCheck.h"
#include "../utils/LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include <optional>
#include <string>

usingnamespaceclang::ast_matchers;

namespace clang::tidy::cppcoreguidelines {

AST_MATCHER(CXXRecordDecl, hasPublicVirtualOrProtectedNonVirtualDestructor) {}

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

static std::optional<CharSourceRange>
getVirtualKeywordRange(const CXXDestructorDecl &Destructor,
                       const SourceManager &SM, const LangOptions &LangOpts) {}

static const AccessSpecDecl *
getPublicASDecl(const CXXRecordDecl &StructOrClass) {}

static FixItHint
generateUserDeclaredDestructor(const CXXRecordDecl &StructOrClass,
                               const SourceManager &SourceManager) {}

static std::string getSourceText(const CXXDestructorDecl &Destructor) {}

static std::string eraseKeyword(std::string &DestructorString,
                                const std::string &Keyword) {}

static FixItHint changePrivateDestructorVisibilityTo(
    const std::string &Visibility, const CXXDestructorDecl &Destructor,
    const SourceManager &SM, const LangOptions &LangOpts) {}

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

} // namespace clang::tidy::cppcoreguidelines