clang 8.0.0

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::ento::FieldNode Class Referenceabstract

A lightweight polymorphic wrapper around FieldRegion *. More...

`#include "/work/www-prereleases/8.0.0/rc2/builddocs/llvm.src/tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h"`

Collaboration diagram for clang::ento::FieldNode:
[legend]

## Public Member Functions
| FieldNode (const FieldRegion *FR)
| FieldNode ()=delete
| FieldNode (const FieldNode &)=delete
| FieldNode (FieldNode &&)=delete
FieldNode & | operator= (const FieldNode &)=delete
FieldNode & | operator= (const FieldNode &&)=delete
void | Profile (llvm::FoldingSetNodeID &ID) const
bool | isSameRegion (const FieldRegion *OtherFR) const
| Helper method for uniqueing. More...
const FieldRegion * | getRegion () const
const FieldDecl * | getDecl () const
virtual void | printNoteMsg (llvm::raw_ostream &Out) const =0
| If this is the last element of the fieldchain, this method will print the note message associated with it. More...
virtual void | printPrefix (llvm::raw_ostream &Out) const =0
| Print any prefixes before the fieldchain. Could contain casts, etc. More...
virtual void | printNode (llvm::raw_ostream &Out) const =0
| Print the node. Should contain the name of the field stored in FR. More...
virtual void | printSeparator (llvm::raw_ostream &Out) const =0
| Print the separator. More...
virtual bool | isBase () const

## Protected Member Functions
| ~FieldNode ()=default
| FieldNodes are never meant to be created on the heap, see FindUninitializedFields::addFieldToUninits(). More...

## Protected Attributes
const FieldRegion * | FR

## Detailed Description

A lightweight polymorphic wrapper around FieldRegion *.

We'll use this interface to store addinitional information about fields. As described later, a list of these objects (i.e. "fieldchain") will be constructed and used for printing note messages should an uninitialized value be found.

Definition at line 78 of file UninitializedObject.h.

## Constructor & Destructor Documentation

## ◆ ~FieldNode()

clang::ento::FieldNode::~FieldNode | ( |  | ) |
| protected default

FieldNodes are never meant to be created on the heap, see FindUninitializedFields::addFieldToUninits().

## ◆ FieldNode() [1/4]

clang::ento::FieldNode::FieldNode | ( | const FieldRegion * | FR | ) |
| inline

Definition at line 87 of file UninitializedObject.h.

## ◆ FieldNode() [2/4]

clang::ento::FieldNode::FieldNode | ( |  | ) |
| delete

## ◆ FieldNode() [3/4]

clang::ento::FieldNode::FieldNode | ( | const FieldNode & |  | ) |
| delete

## ◆ FieldNode() [4/4]

clang::ento::FieldNode::FieldNode | ( | FieldNode && |  | ) |
| delete

## Member Function Documentation

## ◆ getDecl()

const FieldDecl* clang::ento::FieldNode::getDecl | ( |  | ) | const
| inline

Definition at line 111 of file UninitializedObject.h.

References clang::ento::FieldRegion::getDecl().

## ◆ getRegion()

const FieldRegion* clang::ento::FieldNode::getRegion | ( |  | ) | const
| inline

Definition at line 110 of file UninitializedObject.h.

## ◆ isBase()

virtual bool clang::ento::FieldNode::isBase | ( |  | ) | const
| inline virtual

Definition at line 138 of file UninitializedObject.h.

References clang::ento::getVariableName().

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

## ◆ isSameRegion()

bool clang::ento::FieldNode::isSameRegion | ( | const FieldRegion * | OtherFR | ) | const
| inline

Helper method for uniqueing.

Definition at line 100 of file UninitializedObject.h.

## ◆ operator=() [1/2]

FieldNode& clang::ento::FieldNode::operator= | ( | const FieldNode & |  | ) |
| delete

## ◆ operator=() [2/2]

FieldNode& clang::ento::FieldNode::operator= | ( | const FieldNode && |  | ) |
| delete

## ◆ printNode()

virtual void clang::ento::FieldNode::printNode | ( | llvm::raw_ostream & | Out | ) | const
| pure virtual

Print the node. Should contain the name of the field stored in FR.

Referenced by clang::ento::FieldChainInfo::printNoteMsg().

## ◆ printNoteMsg()

virtual void clang::ento::FieldNode::printNoteMsg | ( | llvm::raw_ostream & | Out | ) | const
| pure virtual

If this is the last element of the fieldchain, this method will print the note message associated with it.

The note message should state something like "uninitialized field" or "uninitialized pointee" etc.

Referenced by clang::ento::FieldChainInfo::printNoteMsg().

## ◆ printPrefix()

virtual void clang::ento::FieldNode::printPrefix | ( | llvm::raw_ostream & | Out | ) | const
| pure virtual

Print any prefixes before the fieldchain. Could contain casts, etc.

## ◆ printSeparator()

virtual void clang::ento::FieldNode::printSeparator | ( | llvm::raw_ostream & | Out | ) | const
| pure virtual

Print the separator.

For example, fields may be separated with '.' or "->".

## ◆ Profile()

void clang::ento::FieldNode::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const
| inline

Definition at line 97 of file UninitializedObject.h.

## Member Data Documentation

## ◆ FR

const FieldRegion* clang::ento::FieldNode::FR
| protected

Definition at line 80 of file UninitializedObject.h.

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

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