clang  6.0.0svn
Macros | Enumerations | Functions
UninitializedValues.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Analysis/Analyses/PostOrderCFGView.h"
#include "clang/Analysis/Analyses/UninitializedValues.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/DomainSpecific/ObjCNoReturn.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PackedVector.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/SaveAndRestore.h"
#include <utility>
Include dependency graph for UninitializedValues.cpp:

Go to the source code of this file.

Macros

#define DEBUG_LOGGING   0
 

Enumerations

enum  Value { Unknown = 0x0, Initialized = 0x1, Uninitialized = 0x2, MayUninitialized = 0x3 }
 

Functions

static bool isTrackedVar (const VarDecl *vd, const DeclContext *dc)
 
static bool isUninitialized (const Value v)
 
static bool isAlwaysUninit (const Value v)
 
static const DeclRefExprgetSelfInitExpr (VarDecl *VD)
 
static bool isPointerToConst (const QualType &QT)
 
static bool runOnBlock (const CFGBlock *block, const CFG &cfg, AnalysisDeclContext &ac, CFGBlockValues &vals, const ClassifyRefs &classification, llvm::BitVector &wasAnalyzed, UninitVariablesHandler &handler)
 

Macro Definition Documentation

◆ DEBUG_LOGGING

#define DEBUG_LOGGING   0

Definition at line 34 of file UninitializedValues.cpp.

Enumeration Type Documentation

◆ Value

enum Value
Enumerator
Unknown 
Initialized 
Uninitialized 
MayUninitialized 

Definition at line 91 of file UninitializedValues.cpp.

Function Documentation

◆ getSelfInitExpr()

static const DeclRefExpr* getSelfInitExpr ( VarDecl VD)
static

◆ isAlwaysUninit()

static bool isAlwaysUninit ( const Value  v)
static

Definition at line 99 of file UninitializedValues.cpp.

References clang::CFGBlock::getBlockID(), getValue(), and Uninitialized.

◆ isPointerToConst()

static bool isPointerToConst ( const QualType QT)
static

◆ isTrackedVar()

static bool isTrackedVar ( const VarDecl vd,
const DeclContext dc 
)
static

◆ isUninitialized()

static bool isUninitialized ( const Value  v)
static

Definition at line 96 of file UninitializedValues.cpp.

References Uninitialized.

◆ runOnBlock()

static bool runOnBlock ( const CFGBlock block,
const CFG cfg,
AnalysisDeclContext ac,
CFGBlockValues &  vals,
const ClassifyRefs &  classification,
llvm::BitVector &  wasAnalyzed,
UninitVariablesHandler handler 
)
static