9#ifndef LLVM_CLANG_ANALYZER_WEBKIT_PTRTYPESEMANTICS_H
10#define LLVM_CLANG_ANALYZER_WEBKIT_PTRTYPESEMANTICS_H
12#include "llvm/ADT/APInt.h"
13#include "llvm/ADT/DenseMap.h"
14#include "llvm/ADT/DenseSet.h"
15#include "llvm/ADT/PointerUnion.h"
41std::optional<const clang::CXXRecordDecl *>
43 llvm::StringRef NameToMatch);
77 llvm::DenseSet<const RecordType *> CFPointees;
78 llvm::DenseSet<const Type *> RecordlessTypes;
79 bool IsARCEnabled{
false};
80 bool DefaultSynthProperties{
true};
112std::optional<bool>
isUnsafePtr(
const QualType T,
bool IsArcEnabled);
174 llvm::DenseMap<llvm::PointerUnion<const Decl *, const Stmt *>,
bool>;
175 mutable CacheTy TheCache{};
177 static bool isTrivialImpl(
const Decl *D, CacheTy &
Cache);
178 static bool isTrivialImpl(
const Stmt *S, CacheTy &
Cache);
Represents a base class of a C++ class.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
This represents a decl that may have a name.
A (possibly-)qualified type.
An inter-procedural analysis facility that detects CF types with the underlying pointer type.
bool defaultSynthProperties() const
bool isUnretained(const QualType, bool ignoreARC=false)
void visitTranslationUnitDecl(const TranslationUnitDecl *)
bool isARCEnabled() const
void visitTypedef(const TypedefDecl *)
Stmt - This represents one statement.
The top declaration context.
An inter-procedural analysis facility that detects functions with "trivial" behavior with respect to ...
friend class TrivialFunctionAnalysisVisitor
bool isTrivial(const Stmt *S) const
bool isTrivial(const Decl *D) const
The base class of the type hierarchy.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
The JSON file list parser is used to communicate input to InstallAPI.
bool isCtorOfSafePtr(const clang::FunctionDecl *F)
bool isTrivialBuiltinFunction(const FunctionDecl *F)
bool isPtrConversion(const FunctionDecl *F)
std::optional< bool > isCheckedPtrCapable(const clang::CXXRecordDecl *R)
std::optional< bool > isUnchecked(const QualType T)
bool isCtorOfRefCounted(const clang::FunctionDecl *F)
bool isRefOrCheckedPtrType(const clang::QualType T)
std::optional< bool > isUnsafePtr(const QualType T, bool IsArcEnabled)
bool isRetainPtrType(const clang::QualType T)
const FunctionProtoType * T
std::optional< bool > isUnretained(const QualType T, bool IsARCEnabled)
std::optional< bool > isRefCountable(const clang::CXXRecordDecl *R)
std::optional< const clang::CXXRecordDecl * > hasPublicMethodInBase(const CXXBaseSpecifier *Base, StringRef NameToMatch)
bool isSmartPtrClass(const std::string &Name)
bool isRefCounted(const CXXRecordDecl *R)
bool isOwnerPtrType(const clang::QualType T)
bool isSmartPtr(const CXXRecordDecl *R)
std::optional< bool > isGetterOfSafePtr(const CXXMethodDecl *M)
bool isRefType(const std::string &Name)
std::optional< bool > isUncountedPtr(const QualType T)
bool isCtorOfCheckedPtr(const clang::FunctionDecl *F)
bool isSingleton(const NamedDecl *F)
bool isCheckedPtr(const std::string &Name)
@ Class
The "class" keyword introduces the elaborated-type-specifier.
std::optional< bool > isUncounted(const QualType T)
bool isRetainPtr(const std::string &Name)
std::optional< bool > isUncheckedPtr(const QualType T)