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

Represents a field chain. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h"

Public Types

using FieldChain = llvm::ImmutableList< const FieldNode & >
 

Public Member Functions

 FieldChainInfo ()=delete
 
 FieldChainInfo (FieldChain::Factory &F)
 
 FieldChainInfo (const FieldChainInfo &Other)=default
 
template<class FieldNodeT >
FieldChainInfo add (const FieldNodeT &FN)
 Constructs a new FieldChainInfo object with FN appended.
 
template<class FieldNodeT >
FieldChainInfo replaceHead (const FieldNodeT &FN)
 Constructs a new FieldChainInfo object with FN as the new head of the list.
 
bool contains (const FieldRegion *FR) const
 
bool isEmpty () const
 
const FieldNodegetHead () const
 
const FieldRegiongetUninitRegion () const
 
void printNoteMsg (llvm::raw_ostream &Out) const
 

Detailed Description

Represents a field chain.

A field chain is a list of fields where the first element of the chain is the object under checking (not stored), and every other element is a field, and the element that precedes it is the object that contains it.

Note that this class is immutable (essentially a wrapper around an ImmutableList), new FieldChainInfo objects may be created by member functions such as add() and replaceHead().

Definition at line 160 of file UninitializedObject.h.

Member Typedef Documentation

◆ FieldChain

using clang::ento::FieldChainInfo::FieldChain = llvm::ImmutableList<const FieldNode &>

Definition at line 162 of file UninitializedObject.h.

Constructor & Destructor Documentation

◆ FieldChainInfo() [1/3]

clang::ento::FieldChainInfo::FieldChainInfo ( )
delete

◆ FieldChainInfo() [2/3]

clang::ento::FieldChainInfo::FieldChainInfo ( FieldChain::Factory &  F)
inline

Definition at line 175 of file UninitializedObject.h.

◆ FieldChainInfo() [3/3]

clang::ento::FieldChainInfo::FieldChainInfo ( const FieldChainInfo Other)
default

Member Function Documentation

◆ add()

template<class FieldNodeT >
FieldChainInfo clang::ento::FieldChainInfo::add ( const FieldNodeT &  FN)
inline

Constructs a new FieldChainInfo object with FN appended.

Definition at line 337 of file UninitializedObject.h.

References contains().

Referenced by replaceHead().

◆ contains()

bool FieldChainInfo::contains ( const FieldRegion FR) const

Definition at line 391 of file UninitializedObjectChecker.cpp.

References Node.

Referenced by add().

◆ getHead()

const FieldNode & clang::ento::FieldChainInfo::getHead ( ) const
inline

Definition at line 188 of file UninitializedObject.h.

Referenced by getUninitRegion(), and printNoteMsg().

◆ getUninitRegion()

const FieldRegion * clang::ento::FieldChainInfo::getUninitRegion ( ) const
inline

Definition at line 189 of file UninitializedObject.h.

References getHead(), and clang::ento::FieldNode::getRegion().

◆ isEmpty()

bool clang::ento::FieldChainInfo::isEmpty ( ) const
inline

Definition at line 186 of file UninitializedObject.h.

Referenced by printNoteMsg().

◆ printNoteMsg()

void FieldChainInfo::printNoteMsg ( llvm::raw_ostream &  Out) const

◆ replaceHead()

template<class FieldNodeT >
FieldChainInfo clang::ento::FieldChainInfo::replaceHead ( const FieldNodeT &  FN)
inline

Constructs a new FieldChainInfo object with FN as the new head of the list.

Definition at line 348 of file UninitializedObject.h.

References add().


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