clang 19.0.0git
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 "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h"

Public Member Functions

 FieldNode (const FieldRegion *FR)
 
 FieldNode ()=delete
 
 FieldNode (const FieldNode &)=delete
 
 FieldNode (FieldNode &&)=delete
 
FieldNodeoperator= (const FieldNode &)=delete
 
FieldNodeoperator= (const FieldNode &&)=delete
 
void Profile (llvm::FoldingSetNodeID &ID) const
 
bool isSameRegion (const FieldRegion *OtherFR) const
 Helper method for uniqueing.
 
const FieldRegiongetRegion () const
 
const FieldDeclgetDecl () 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.
 
virtual void printPrefix (llvm::raw_ostream &Out) const =0
 Print any prefixes before the fieldchain. Could contain casts, etc.
 
virtual void printNode (llvm::raw_ostream &Out) const =0
 Print the node. Should contain the name of the field stored in FR.
 
virtual void printSeparator (llvm::raw_ostream &Out) const =0
 Print the separator.
 
virtual bool isBase () const
 

Protected Member Functions

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

Protected Attributes

const FieldRegionFR
 

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 85 of file UninitializedObject.h.

Constructor & Destructor Documentation

◆ ~FieldNode()

clang::ento::FieldNode::~FieldNode ( )
protecteddefault

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 94 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 118 of file UninitializedObject.h.

References FR, and clang::ento::FieldRegion::getDecl().

◆ getRegion()

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

Definition at line 117 of file UninitializedObject.h.

References FR.

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

◆ isBase()

virtual bool clang::ento::FieldNode::isBase ( ) const
inlinevirtual

Definition at line 145 of file UninitializedObject.h.

◆ isSameRegion()

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

Helper method for uniqueing.

Definition at line 107 of file UninitializedObject.h.

References FR.

◆ 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 104 of file UninitializedObject.h.

References ID.

Member Data Documentation

◆ FR

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

Definition at line 87 of file UninitializedObject.h.

Referenced by getDecl(), getRegion(), and isSameRegion().


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