clang 24.0.0git
ASTUtils.cpp File Reference
#include "ASTUtils.h"
#include "PtrTypesSemantics.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Analysis/Analyses/LifetimeSafety/LifetimeAnnotations.h"
#include <optional>
#include <utility>

Go to the source code of this file.

Classes

class  clang::EnsureFunctionVisitor

Namespaces

namespace  clang
 Top level wrappers for InstallAPI frontend operations.

Functions

bool clang::isSafePtr (clang::CXXRecordDecl *Decl)
static bool clang::tryToFindPtrOriginImpl (const Expr *E, bool StopAtFirstRefCountedObj, bool FollowLifetimeBound, std::function< bool(const clang::CXXRecordDecl *)> isSafePtr, std::function< bool(const clang::QualType)> isSafePtrType, std::function< bool(const clang::Decl *)> isSafeGlobalDecl, std::function< bool(const clang::Expr *, bool, bool, bool)> callback, bool OriginDependsOnFullExpressionTemporary, bool PtrIsLifetimeBoundToOrigin)
bool clang::tryToFindPtrOrigin (const clang::Expr *E, bool StopAtFirstRefCountedObj, bool FollowLifetimeBound, std::function< bool(const clang::CXXRecordDecl *)> isSafePtr, std::function< bool(const clang::QualType)> isSafePtrType, std::function< bool(const clang::Decl *)> isSafeGlobalDecl, std::function< bool(const clang::Expr *, bool, bool, bool)> callback)
 This function de-facto defines a set of transformations that we consider safe (in heuristical sense).
bool clang::originOutlivesCall (const clang::Expr *E)
 For E referring to a ref-countable/-counted pointer/reference we return whether the pointee outlives the current function call.
bool clang::isNullPtr (const clang::Expr *E)
bool clang::isConstOwnerPtrMemberExpr (const clang::Expr *E)
bool clang::isExprToGetCheckedPtrCapableMember (const clang::Expr *E)
bool clang::isAllocInit (const Expr *E, const Expr **InnerExpr)
ObjCInterfaceDecl * clang::getObjCDeclFromObjCPtr (const Type *TypePtr)