llvm/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp

//=======- PtrTypesSemantics.cpp ---------------------------------*- C++ -*-==//
//
// 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 "PtrTypesSemantics.h"
#include "ASTUtils.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/StmtVisitor.h"
#include <optional>

usingnamespaceclang;

namespace {

bool hasPublicMethodInBaseClass(const CXXRecordDecl *R, StringRef NameToMatch) {}

} // namespace

namespace clang {

std::optional<const clang::CXXRecordDecl *>
hasPublicMethodInBase(const CXXBaseSpecifier *Base, StringRef NameToMatch) {}

std::optional<bool> isSmartPtrCompatible(const CXXRecordDecl *R,
                                         StringRef IncMethodName,
                                         StringRef DecMethodName) {}

std::optional<bool> isRefCountable(const clang::CXXRecordDecl *R) {}

std::optional<bool> isCheckedPtrCapable(const clang::CXXRecordDecl *R) {}

bool isRefType(const std::string &Name) {}

bool isCheckedPtr(const std::string &Name) {}

bool isCtorOfRefCounted(const clang::FunctionDecl *F) {}

bool isRefType(const clang::QualType T) {}

std::optional<bool> isUncounted(const QualType T) {}

std::optional<bool> isUncounted(const CXXRecordDecl* Class)
{}

std::optional<bool> isUncountedPtr(const QualType T) {}

std::optional<bool> isGetterOfRefCounted(const CXXMethodDecl* M)
{}

bool isRefCounted(const CXXRecordDecl *R) {}

bool isCheckedPtr(const CXXRecordDecl *R) {}

bool isPtrConversion(const FunctionDecl *F) {}

bool isSingleton(const FunctionDecl *F) {}

// We only care about statements so let's use the simple
// (non-recursive) visitor.
class TrivialFunctionAnalysisVisitor
    : public ConstStmtVisitor<TrivialFunctionAnalysisVisitor, bool> {};

bool TrivialFunctionAnalysis::isTrivialImpl(
    const Decl *D, TrivialFunctionAnalysis::CacheTy &Cache) {}

bool TrivialFunctionAnalysis::isTrivialImpl(
    const Stmt *S, TrivialFunctionAnalysis::CacheTy &Cache) {}

} // namespace clang