class FieldNode
Declaration
class FieldNode { /* full declaration omitted */ };
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.
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:85
Member Variables
- protected const clang::ento::FieldRegion* FR
Method Overview
- public FieldNode(const clang::ento::FieldRegion * FR)
- public FieldNode()
- public FieldNode(const clang::ento::FieldNode &)
- public FieldNode(clang::ento::FieldNode &&)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public const clang::FieldDecl * getDecl() const
- public const clang::ento::FieldRegion * getRegion() const
- public virtual bool isBase() const
- public bool isSameRegion(const clang::ento::FieldRegion * OtherFR) const
- public virtual void printNode(llvm::raw_ostream & Out) const
- public virtual void printNoteMsg(llvm::raw_ostream & Out) const
- public virtual void printPrefix(llvm::raw_ostream & Out) const
- public virtual void printSeparator(llvm::raw_ostream & Out) const
- protected ~FieldNode()
Methods
¶FieldNode(const clang::ento::FieldRegion* FR)
FieldNode(const clang::ento::FieldRegion* FR)
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:94
Parameters
- const clang::ento::FieldRegion* FR
¶FieldNode()
FieldNode()
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:98
¶FieldNode(const clang::ento::FieldNode&)
FieldNode(const clang::ento::FieldNode&)
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:99
Parameters
- const clang::ento::FieldNode&
¶FieldNode(clang::ento::FieldNode&&)
FieldNode(clang::ento::FieldNode&&)
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:100
Parameters
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:104
Parameters
¶const clang::FieldDecl* getDecl() const
const clang::FieldDecl* getDecl() const
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:118
¶const clang::ento::FieldRegion* getRegion() const
const clang::ento::FieldRegion* getRegion() const
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:117
¶virtual bool isBase() const
virtual bool isBase() const
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:145
¶bool isSameRegion(
const clang::ento::FieldRegion* OtherFR) const
bool isSameRegion(
const clang::ento::FieldRegion* OtherFR) const
Description
Helper method for uniqueing.
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:107
Parameters
- const clang::ento::FieldRegion* OtherFR
¶virtual void printNode(
llvm::raw_ostream& Out) const
virtual void printNode(
llvm::raw_ostream& Out) const
Description
Print the node. Should contain the name of the field stored in FR.
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:139
Parameters
- llvm::raw_ostream& Out
¶virtual void printNoteMsg(
llvm::raw_ostream& Out) const
virtual void printNoteMsg(
llvm::raw_ostream& Out) const
Description
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.
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:133
Parameters
- llvm::raw_ostream& Out
¶virtual void printPrefix(
llvm::raw_ostream& Out) const
virtual void printPrefix(
llvm::raw_ostream& Out) const
Description
Print any prefixes before the fieldchain. Could contain casts, etc.
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:136
Parameters
- llvm::raw_ostream& Out
¶virtual void printSeparator(
llvm::raw_ostream& Out) const
virtual void printSeparator(
llvm::raw_ostream& Out) const
Description
Print the separator. For example, fields may be separated with '.' or "->".
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:143
Parameters
- llvm::raw_ostream& Out
¶~FieldNode()
~FieldNode()
Description
FieldNodes are never meant to be created on the heap, see FindUninitializedFields::addFieldToUninits().
Declared at: clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h:91