clang
7.0.0
|
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "PrettyStackTraceLocationContext.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/ConstructionContext.h"
#include "clang/Analysis/ProgramPoint.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/PrettyStackTrace.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/ImmutableMap.h"
#include "llvm/ADT/ImmutableSet.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DOTGraphTraits.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
class | ConstructedObjectKey |
ConstructedObjectKey is used for being able to find the path-sensitive memory region of a freshly constructed object while modeling the AST node that syntactically represents the object that is being constructed. More... | |
struct | llvm::DOTGraphTraits< ExplodedNode * > |
Namespaces | |
llvm | |
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterators. | |
Macros | |
#define | DEBUG_TYPE "ExprEngine" |
Typedefs | |
typedef llvm::ImmutableMap< ConstructedObjectKey, SVal > | ObjectsUnderConstructionMap |
Functions | |
STATISTIC (NumRemoveDeadBindings, "The # of times RemoveDeadBindings is called") | |
STATISTIC (NumMaxBlockCountReached, "The # of aborted paths due to reaching the maximum block count in " "a top level function") | |
STATISTIC (NumMaxBlockCountReachedInInlined, "The # of aborted paths due to reaching the maximum block count in " "an inlined function") | |
STATISTIC (NumTimesRetriedWithoutInlining, "The # of times we re-evaluated a call without inlining") | |
REGISTER_TRAIT_WITH_PROGRAMSTATE (ObjectsUnderConstruction, ObjectsUnderConstructionMap) static const char *TagProviderName | |
static void | printObjectsUnderConstructionForContext (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep, const LocationContext *LC) |
static bool | shouldRemoveDeadBindings (AnalysisManager &AMgr, const Stmt *S, const ExplodedNode *Pred, const LocationContext *LC) |
static SVal | RecoverCastedSymbol (ProgramStateManager &StateMgr, ProgramStateRef state, const Stmt *Condition, const LocationContext *LCtx, ASTContext &Ctx) |
RecoverCastedSymbol - A helper function for ProcessBranch that is used to try to recover some path-sensitivity for casts of symbolic integers that promote their values (which are currently not tracked well). More... | |
static const Stmt * | getRightmostLeaf (const Stmt *Condition) |
static const Stmt * | ResolveCondition (const Stmt *Condition, const CFGBlock *B) |
REGISTER_TRAIT_WITH_PROGRAMSTATE (InitializedGlobalsSet, llvm::ImmutableSet< const VarDecl *>) void ExprEngine | |
The GDM component containing the set of global variables which have been previously initialized with explicit initializers. More... | |
Variables | |
static ExprEngine * | GraphPrintCheckerState |
static SourceManager * | GraphPrintSourceManager |
#define DEBUG_TYPE "ExprEngine" |
Definition at line 88 of file ExprEngine.cpp.
typedef llvm::ImmutableMap<ConstructedObjectKey, SVal> ObjectsUnderConstructionMap |
Definition at line 169 of file ExprEngine.cpp.
Definition at line 1965 of file ExprEngine.cpp.
|
static |
Definition at line 523 of file ExprEngine.cpp.
References clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getASTContext(), and clang::ASTContext::getPrintingPolicy().
Referenced by clang::ento::ExprEngine::printState().
|
static |
RecoverCastedSymbol - A helper function for ProcessBranch that is used to try to recover some path-sensitivity for casts of symbolic integers that promote their values (which are currently not tracked well).
This function returns the SVal bound to Condition->IgnoreCasts if all the
Definition at line 1926 of file ExprEngine.cpp.
References clang::ASTContext::getTypeSize(), and clang::Type::isIntegralOrEnumerationType().
Referenced by clang::ento::ExprEngine::processBranch().
REGISTER_TRAIT_WITH_PROGRAMSTATE | ( | ObjectsUnderConstruction | , |
ObjectsUnderConstructionMap | |||
) | const |
REGISTER_TRAIT_WITH_PROGRAMSTATE | ( | InitializedGlobalsSet | , |
llvm::ImmutableSet< const VarDecl *> | |||
) |
The GDM component containing the set of global variables which have been previously initialized with explicit initializers.
Definition at line 2120 of file ExprEngine.cpp.
References clang::ento::ExplodedNode::getLocationContext(), clang::DeclStmt::getSingleDecl(), clang::ento::ExplodedNode::getState(), and clang::CodeGen::state.
Definition at line 1991 of file ExprEngine.cpp.
References clang::CFGBlock::getTerminator(), and clang::CFGTerminator::isTemporaryDtorsBranch().
Referenced by clang::ento::ExprEngine::processBranch().
|
static |
Definition at line 596 of file ExprEngine.cpp.
Referenced by clang::ento::ExprEngine::ProcessStmt().
STATISTIC | ( | NumRemoveDeadBindings | , |
"The # of times RemoveDeadBindings is called" | |||
) |
STATISTIC | ( | NumMaxBlockCountReached | , |
"The # of aborted paths due to reaching the maximum block count in " "a top level function" | |||
) |
STATISTIC | ( | NumMaxBlockCountReachedInInlined | , |
"The # of aborted paths due to reaching the maximum block count in " "an inlined function" | |||
) |
STATISTIC | ( | NumTimesRetriedWithoutInlining | , |
"The # of times we re-evaluated a call without inlining" | |||
) |
|
static |
Definition at line 2930 of file ExprEngine.cpp.
|
static |
Definition at line 2931 of file ExprEngine.cpp.