//===--- SlicingCheck.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 "SlicingCheck.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecordLayout.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" usingnamespaceclang::ast_matchers; namespace clang::tidy::cppcoreguidelines { void SlicingCheck::registerMatchers(MatchFinder *Finder) { … } /// Warns on methods overridden in DerivedDecl with respect to BaseDecl. /// FIXME: this warns on all overrides outside of the sliced path in case of /// multiple inheritance. void SlicingCheck::diagnoseSlicedOverriddenMethods( const Expr &Call, const CXXRecordDecl &DerivedDecl, const CXXRecordDecl &BaseDecl) { … } void SlicingCheck::check(const MatchFinder::MatchResult &Result) { … } } // namespace clang::tidy::cppcoreguidelines