clang API Documentation
#include "clang/AST/ASTContext.h"#include "clang/AST/Attr.h"#include "clang/AST/Decl.h"#include "clang/AST/StmtVisitor.h"#include "clang/Analysis/Analyses/PostOrderCFGView.h"#include "clang/Analysis/Analyses/UninitializedValues.h"#include "clang/Analysis/AnalysisContext.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>
Go to the source code of this file.
Defines | |
| #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 DeclRefExpr * | getSelfInitExpr (VarDecl *VD) |
| static bool | runOnBlock (const CFGBlock *block, const CFG &cfg, AnalysisDeclContext &ac, CFGBlockValues &vals, const ClassifyRefs &classification, llvm::BitVector &wasAnalyzed, UninitVariablesHandler &handler) |
| #define DEBUG_LOGGING 0 |
Definition at line 33 of file UninitializedValues.cpp.
| enum Value |
Definition at line 90 of file UninitializedValues.cpp.
| static const DeclRefExpr* getSelfInitExpr | ( | VarDecl * | VD | ) | [static] |
Definition at line 349 of file UninitializedValues.cpp.
References clang::Decl::getASTContext(), clang::DeclRefExpr::getDecl(), and clang::VarDecl::getInit().
| static bool isAlwaysUninit | ( | const Value | v | ) | [static] |
Definition at line 98 of file UninitializedValues.cpp.
References Uninitialized.
| static bool isTrackedVar | ( | const VarDecl * | vd, |
| const DeclContext * | dc | ||
| ) | [static] |
Definition at line 35 of file UninitializedValues.cpp.
References clang::Decl::getDeclContext(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::VarDecl::isExceptionVariable(), clang::VarDecl::isInitCapture(), clang::VarDecl::isLocalVarDecl(), clang::Type::isScalarType(), and clang::Type::isVectorType().
| static bool isUninitialized | ( | const Value | v | ) | [static] |
Definition at line 95 of file UninitializedValues.cpp.
References Uninitialized.
| static bool runOnBlock | ( | const CFGBlock * | block, |
| const CFG & | cfg, | ||
| AnalysisDeclContext & | ac, | ||
| CFGBlockValues & | vals, | ||
| const ClassifyRefs & | classification, | ||
| llvm::BitVector & | wasAnalyzed, | ||
| UninitVariablesHandler & | handler | ||
| ) | [static] |
Definition at line 767 of file UninitializedValues.cpp.
References clang::CFGBlock::begin(), clang::CFGBlock::end(), clang::CFGBlock::getBlockID(), clang::CFGBlock::pred_begin(), and clang::CFGBlock::pred_end().
Referenced by clang::runUninitializedVariablesAnalysis().