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

//===--- OwningMemoryCheck.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 "OwningMemoryCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <string>
#include <vector>

usingnamespaceclang::ast_matchers;
usingnamespaceclang::ast_matchers::internal;

namespace clang::tidy::cppcoreguidelines {

namespace {
AST_MATCHER_P(LambdaExpr, hasCallOperator, Matcher<CXXMethodDecl>,
              InnerMatcher) {}

AST_MATCHER_P(LambdaExpr, hasLambdaBody, Matcher<Stmt>, InnerMatcher) {}
} // namespace

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

/// Match common cases, where the owner semantic is relevant, like function
/// calls, delete expressions and others.
void OwningMemoryCheck::registerMatchers(MatchFinder *Finder) {}

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

bool OwningMemoryCheck::handleDeletion(const BoundNodes &Nodes) {}

bool OwningMemoryCheck::handleLegacyConsumers(const BoundNodes &Nodes) {}

bool OwningMemoryCheck::handleExpectedOwner(const BoundNodes &Nodes) {}

/// Assignment and initialization of owner variables.
bool OwningMemoryCheck::handleAssignmentAndInit(const BoundNodes &Nodes) {}

/// Problematic assignment and initializations, since the assigned value is a
/// newly created owner.
bool OwningMemoryCheck::handleAssignmentFromNewOwner(const BoundNodes &Nodes) {}

bool OwningMemoryCheck::handleReturnValues(const BoundNodes &Nodes) {}

bool OwningMemoryCheck::handleOwnerMembers(const BoundNodes &Nodes) {}

} // namespace clang::tidy::cppcoreguidelines