15 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_UNINITIALIZEDVALUES_H 16 #define LLVM_CLANG_ANALYSIS_ANALYSES_UNINITIALIZEDVALUES_H 19 #include "llvm/ADT/SmallVector.h" 23 class AnalysisDeclContext;
56 : User(User), UninitAfterCall(
false), UninitAfterDecl(
false),
57 AlwaysUninit(AlwaysUninit) {}
60 UninitBranches.push_back(B);
87 return AlwaysUninit ?
Always :
95 branch_iterator
branch_begin()
const {
return UninitBranches.begin(); }
96 branch_iterator
branch_end()
const {
return UninitBranches.end(); }
Stmt - This represents one statement.
bool branch_empty() const
The use is uninitialized whenever a certain branch is taken.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
The use might be uninitialized.
branch_iterator branch_end() const
void setUninitAfterCall()
Kind getKind() const
Get the kind of uninitialized use.
branch_iterator branch_begin() const
Branches which inevitably result in the variable being used uninitialized.
AnalysisDeclContext contains the context data for the function or method under analysis.
SmallVectorImpl< Branch >::const_iterator branch_iterator
Kind
The kind of uninitialized use.
Expr - This represents one expression.
CFG - Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt...
virtual void handleSelfInit(const VarDecl *vd)
Called when the uninitialized variable analysis detects the idiom 'int x = x'.
void runUninitializedVariablesAnalysis(const DeclContext &dc, const CFG &cfg, AnalysisDeclContext &ac, UninitVariablesHandler &handler, UninitVariablesAnalysisStats &stats)
UninitUse(const Expr *User, bool AlwaysUninit)
A use of a variable, which might be uninitialized.
virtual void handleUseOfUninitVariable(const VarDecl *vd, const UninitUse &use)
Called when the uninitialized variable is used at the given expression.
The use is uninitialized the first time it is reached after we reach the variable's declaration...
Dataflow Directional Tag Classes.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
void setUninitAfterDecl()
const Expr * getUser() const
Get the expression containing the uninitialized use.
The use is always uninitialized.
The use is uninitialized the first time it is reached after the function is called.
unsigned NumVariablesAnalyzed
void addUninitBranch(Branch B)