|
clang 24.0.0git
|
Models one WebKit pointer-safety policy: ref-counted (RefPtr), checked (CheckedPtr), or retainable (RetainPtr/OSPtr). More...
Public Member Functions | |
| virtual | ~PtrRefSafetyModel ()=default |
| virtual std::optional< bool > | isUnsafeType (QualType QT) const =0 |
| virtual std::optional< bool > | isUnsafePtr (QualType QT, bool IgnoreARC=false) const =0 |
| virtual bool | isSafePtr (const CXXRecordDecl *Record) const =0 |
| virtual bool | isSafePtrType (QualType T) const =0 |
| virtual bool | isPtrType (const std::string &Name) const =0 |
| virtual bool | isSafeExpr (const Expr *) const |
| virtual bool | isSafeDecl (const Decl *, const SourceManager &) const |
| virtual const char * | typeName () const =0 |
| virtual RetainTypeChecker * | retainTypeChecker () const |
Models one WebKit pointer-safety policy: ref-counted (RefPtr), checked (CheckedPtr), or retainable (RetainPtr/OSPtr).
It captures the family-specific "what is a safe/unsafe pointer" questions that are shared by the various RawPtrRef* checkers, independently of how each checker traverses the AST (call arguments, local variables, members, lambda captures, ...). This lets a single policy be defined once and reused across every traversal.
Definition at line 32 of file RawPtrRefSafetyModel.h.
|
virtualdefault |
|
pure virtual |
Name is the name of a safe smart pointer class for this policy.
|
inlinevirtual |
D refers to a declaration that is safe by construction for this policy (e.g. immortal system-header globals). Definition at line 61 of file RawPtrRefSafetyModel.h.
E is known to produce a safe value for this policy. Definition at line 57 of file RawPtrRefSafetyModel.h.
|
pure virtual |
Record is a safe smart pointer for this policy. T is a safe smart pointer type for this policy. References clang::T.
|
pure virtual |
QT is a raw pointer or reference to an unsafe type, false if not, std::nullopt if inconclusive. IgnoreARC requests that Objective-C ARC be ignored when deciding retainability.
|
pure virtual |
QT itself is an unsafe (smart-pointer-capable but not managed) type, false if not, std::nullopt if inconclusive.
|
inlinevirtual |
Definition at line 71 of file RawPtrRefSafetyModel.h.
|
pure virtual |