clang 10.0.0git

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

Represents a field chain. More...

`#include "/work/www-prereleases/10.0.0/rc1/docsbuild/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. More...
template<class FieldNodeT >
FieldChainInfo | replaceHead (const FieldNodeT &FN)
| Constructs a new FieldChainInfo object with `FN` as the new head of the list. More...
bool | contains (const FieldRegion *FR) const
bool | isEmpty () const
const FieldNode & | getHead () const
const FieldRegion * | getUninitRegion () 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.

Referenced by DereferenceInfo::DereferenceInfo(), clang::ento::FindUninitializedFields::FindUninitializedFields(), and replaceHead().

## ◆ contains()

bool FieldChainInfo::contains | ( | const FieldRegion * | FR | ) | const

Definition at line 396 of file UninitializedObjectChecker.cpp.

References printTail().

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields().

## ◆ getHead()

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

Definition at line 188 of file UninitializedObject.h.

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields().

## ◆ getUninitRegion()

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

Definition at line 189 of file UninitializedObject.h.

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields().

## ◆ isEmpty()

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

Definition at line 186 of file UninitializedObject.h.

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields(), and printNoteMsg().

## ◆ printNoteMsg()

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

Definition at line 424 of file UninitializedObjectChecker.cpp.

References isEmpty(), clang::ento::FieldNode::printNode(), clang::ento::FieldNode::printNoteMsg(), and printTail().

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields().

## ◆ 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().

Referenced by clang::ento::FindUninitializedFields::FindUninitializedFields().

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

- lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
- lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp