clang 24.0.0git
clang::lifetimes::internal::ThisEscapeFact Class Reference

Represents an origin escaping through the enclosing object this, which outlives the current method. More...

#include "clang/Analysis/Analyses/LifetimeSafety/Facts.h"

Inheritance diagram for clang::lifetimes::internal::ThisEscapeFact:
[legend]

Public Member Functions

 ThisEscapeFact (OriginID OID, SourceLocation Loc)
SourceLocation getLoc () const
void dump (llvm::raw_ostream &OS, const LoanManager &, const OriginManager &OM, const LoanPropagationAnalysis *LPA=nullptr) const override
Public Member Functions inherited from clang::lifetimes::internal::OriginEscapesFact
 OriginEscapesFact (OriginID OID, EscapeKind EscKind)
OriginID getEscapedOriginID () const
EscapeKind getEscapeKind () const
Public Member Functions inherited from clang::lifetimes::internal::Fact
virtual ~Fact ()=default
Kind getKind () const
void setID (FactID ID)
FactID getID () const
template<typename T>
const T * getAs () const

Static Public Member Functions

static bool classof (const Fact *F)
Static Public Member Functions inherited from clang::lifetimes::internal::OriginEscapesFact
static bool classof (const Fact *F)

Additional Inherited Members

Public Types inherited from clang::lifetimes::internal::OriginEscapesFact
enum class  EscapeKind : uint8_t { Return , Field , Global , This }
 The way an origin can escape the current scope. More...
Public Types inherited from clang::lifetimes::internal::Fact
enum class  Kind : uint8_t {
  Issue , Expire , OriginFlow , Use ,
  MovedOrigin , TestPoint , OriginEscapes , InvalidateOrigin ,
  KillOrigin
}
Public Attributes inherited from clang::lifetimes::internal::OriginEscapesFact
enum clang::lifetimes::internal::OriginEscapesFact::EscapeKind EscKind
Protected Member Functions inherited from clang::lifetimes::internal::Fact
 Fact (Kind K)

Detailed Description

Represents an origin escaping through the enclosing object this, which outlives the current method.

Emitted for this at function exit so a borrow still held by the object there is seen as escaping – e.g. a borrow captured via [[clang::lifetime_capture_by_this]] that outlived the captured local is reported as a use-after-scope.

Definition at line 253 of file Facts.h.

Constructor & Destructor Documentation

◆ ThisEscapeFact()

clang::lifetimes::internal::ThisEscapeFact::ThisEscapeFact ( OriginID OID,
SourceLocation Loc )
inline

Member Function Documentation

◆ classof()

◆ dump()

void clang::lifetimes::internal::ThisEscapeFact::dump ( llvm::raw_ostream & OS,
const LoanManager & ,
const OriginManager & OM,
const LoanPropagationAnalysis * LPA = nullptr ) const
overridevirtual

◆ getLoc()

SourceLocation clang::lifetimes::internal::ThisEscapeFact::getLoc ( ) const
inline

Definition at line 265 of file Facts.h.


The documentation for this class was generated from the following files: