clang 20.0.0git
Public Member Functions | List of all members
clang::ento::RuntimeDefinition Class Reference

Defines the runtime definition of the called function. More...

#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"

Public Member Functions

 RuntimeDefinition ()=default
 
 RuntimeDefinition (const Decl *InD)
 
 RuntimeDefinition (const Decl *InD, bool Foreign)
 
 RuntimeDefinition (const Decl *InD, const MemRegion *InR)
 
const DeclgetDecl ()
 
bool isForeign () const
 
bool mayHaveOtherDefinitions ()
 Check if the definition we have is precise.
 
const MemRegiongetDispatchRegion ()
 When other definitions are possible, returns the region whose runtime type determines the method definition.
 

Detailed Description

Defines the runtime definition of the called function.

Encapsulates the information we have about which Decl will be used when the call is executed on the given path. When dealing with dynamic dispatch, the information is based on DynamicTypeInfo and might not be precise.

Definition at line 110 of file CallEvent.h.

Constructor & Destructor Documentation

◆ RuntimeDefinition() [1/4]

clang::ento::RuntimeDefinition::RuntimeDefinition ( )
default

◆ RuntimeDefinition() [2/4]

clang::ento::RuntimeDefinition::RuntimeDefinition ( const Decl InD)
inline

Definition at line 127 of file CallEvent.h.

References D.

◆ RuntimeDefinition() [3/4]

clang::ento::RuntimeDefinition::RuntimeDefinition ( const Decl InD,
bool  Foreign 
)
inline

Definition at line 128 of file CallEvent.h.

References D.

◆ RuntimeDefinition() [4/4]

clang::ento::RuntimeDefinition::RuntimeDefinition ( const Decl InD,
const MemRegion InR 
)
inline

Definition at line 129 of file CallEvent.h.

References D.

Member Function Documentation

◆ getDecl()

const Decl * clang::ento::RuntimeDefinition::getDecl ( )
inline

Definition at line 131 of file CallEvent.h.

References D.

Referenced by clang::ento::ExprEngine::defaultEvalCall().

◆ getDispatchRegion()

const MemRegion * clang::ento::RuntimeDefinition::getDispatchRegion ( )
inline

When other definitions are possible, returns the region whose runtime type determines the method definition.

Definition at line 141 of file CallEvent.h.

Referenced by clang::ento::ExprEngine::defaultEvalCall().

◆ isForeign()

bool clang::ento::RuntimeDefinition::isForeign ( ) const
inline

Definition at line 132 of file CallEvent.h.

Referenced by clang::ento::ExprEngine::defaultEvalCall().

◆ mayHaveOtherDefinitions()

bool clang::ento::RuntimeDefinition::mayHaveOtherDefinitions ( )
inline

Check if the definition we have is precise.

If not, it is possible that the call dispatches to another definition at execution time.

Definition at line 137 of file CallEvent.h.

Referenced by clang::ento::ExprEngine::defaultEvalCall().


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