class RuntimeDefinition

Declaration

class RuntimeDefinition { /* full declaration omitted */ };

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.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:105

Member Variables

private const clang::Decl* D = nullptr
The Declaration of the function which could be called at runtime. NULL if not available.
private const clang::ento::MemRegion* R = nullptr
The region representing an object (ObjC/C++) on which the method is called. With dynamic dispatch, the method definition depends on the runtime type of this object. NULL when the DynamicTypeInfo is precise.
private const bool Foreign = false
A definition is foreign if it has been imported and newly created by the ASTImporter. This can be true only if CTU is enabled.

Method Overview

Methods

RuntimeDefinition()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:121

RuntimeDefinition(const clang::Decl* InD)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:122

Parameters

const clang::Decl* InD

RuntimeDefinition(const clang::Decl* InD,
                  bool Foreign)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:123

Parameters

const clang::Decl* InD
bool Foreign

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:124

Parameters

const clang::Decl* InD
const clang::ento::MemRegion* InR

const clang::Decl* getDecl()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:126

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

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:136

bool isForeign() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:127

bool mayHaveOtherDefinitions()

Description

Check if the definition we have is precise. If not, it is possible that the call dispatches to another definition at execution time.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:132