clang
7.0.0
|
#include "clang/Analysis/AnalysisDeclContext.h"
Public Types | |
enum | ContextKind { StackFrame, Scope, Block } |
Public Member Functions | |
virtual | ~LocationContext () |
ContextKind | getKind () const |
AnalysisDeclContext * | getAnalysisDeclContext () const |
const LocationContext * | getParent () const |
bool | isParentOf (const LocationContext *LC) const |
const Decl * | getDecl () const |
CFG * | getCFG () const |
template<typename T > | |
T * | getAnalysis () const |
ParentMap & | getParentMap () const |
const ImplicitParamDecl * | getSelfDecl () const |
const StackFrameContext * | getStackFrame () const |
virtual bool | inTopFrame () const |
Return true if the current LocationContext has no caller context. More... | |
virtual void | Profile (llvm::FoldingSetNodeID &ID)=0 |
void | dumpStack (raw_ostream &OS, StringRef Indent={}, const char *NL="\, const char *Sep="", std::function< void(const LocationContext *)> printMoreInfoPerContext=[](const LocationContext *) {}) const |
void | dumpStack () const |
Static Public Member Functions | |
static void | ProfileCommon (llvm::FoldingSetNodeID &ID, ContextKind ck, AnalysisDeclContext *ctx, const LocationContext *parent, const void *data) |
Protected Member Functions | |
LocationContext (ContextKind k, AnalysisDeclContext *ctx, const LocationContext *parent) | |
Definition at line 221 of file AnalysisDeclContext.h.
Enumerator | |
---|---|
StackFrame | |
Scope | |
Block |
Definition at line 223 of file AnalysisDeclContext.h.
|
inlineprotected |
Definition at line 235 of file AnalysisDeclContext.h.
|
virtualdefault |
Referenced by clang::AnalysisDeclContext::~AnalysisDeclContext().
void LocationContext::dumpStack | ( | raw_ostream & | OS, |
StringRef | Indent = {} , |
||
const char * | NL = "\n" , |
||
const char * | Sep = "" , |
||
std::function< void(const LocationContext *)> | printMoreInfoPerContext = [](const LocationContext *) {} |
||
) | const |
Definition at line 481 of file AnalysisDeclContext.cpp.
Referenced by clang::ento::PrettyStackTraceLocationContext::print(), and clang::ento::ExprEngine::printState().
LLVM_DUMP_METHOD void LocationContext::dumpStack | ( | ) | const |
Definition at line 523 of file AnalysisDeclContext.cpp.
|
inline |
Definition at line 255 of file AnalysisDeclContext.h.
Referenced by clang::ento::ExplodedNode::getAnalysis().
|
inline |
Definition at line 244 of file AnalysisDeclContext.h.
Referenced by clang::ento::SValBuilder::conjureSymbolVal(), findTopAutosynthesizedParentContext(), clang::ento::SValBuilder::getBlockPointer(), clang::ento::CallEvent::getCalleeAnalysisDeclContext(), clang::ento::CheckerContext::getCurrentAnalysisDeclContext(), clang::ObjCMethodCall::getInitialStackFrameContents(), getLocationForCaller(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), clang::ento::PathDiagnosticLocation::getStmt(), clang::ento::getWidenedLoopState(), isSynthesizedAccessor(), printObjectsUnderConstructionForContext(), clang::ento::ExprEngine::removeDeadOnEndOfFunction(), and clang::ento::PathDiagnosticCallPiece::setCallee().
|
inline |
Definition at line 252 of file AnalysisDeclContext.h.
Referenced by clang::ento::CoreEngine::ExecuteWorkList(), clang::ento::ExplodedNode::getCFG(), clang::CallEnter::getEntry(), and clang::ento::BugReport::getStmt().
|
inline |
Definition at line 250 of file AnalysisDeclContext.h.
Referenced by checkInvariantViolation(), checkSelfIvarsForInvariantViolation(), clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::ento::PathDiagnosticLocation::createDeclEnd(), clang::ento::CoreEngine::ExecuteWorkList(), generatePathDiagnosticForConsumer(), generatePathDiagnosticsForNode(), GetAllocationSite(), getAsPointeeSymbol(), clang::CallEventManager::getCaller(), clang::ento::ExplodedNode::getCodeDecl(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::AnyFunctionCall::getInitialStackFrameContents(), clang::BlockCall::getInitialStackFrameContents(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CXXConstructorCall::getInitialStackFrameContents(), clang::ObjCMethodCall::getInitialStackFrameContents(), clang::ento::ExprEngine::getInitialState(), isCalledByConstructor(), isLeftShiftResultUnrepresentable(), isSynthesizedAccessor(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessMemberDtor(), llvm::FoldingSetTrait< ObjectState >::Profile(), recordFixedType(), reversePropagateInterestingSymbols(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::ento::ExprEngine::VisitCXXConstructExpr(), and wasDifferentDeclUsedForInlining().
|
inline |
Definition at line 242 of file AnalysisDeclContext.h.
Referenced by clang::StackFrameContext::classof(), clang::ScopeContext::classof(), and clang::BlockInvocationContext::classof().
|
inline |
Definition at line 246 of file AnalysisDeclContext.h.
References Parent.
Referenced by findTopAutosynthesizedParentContext(), getArgumentValueString(), getAsPointeeSymbol(), clang::CallEventManager::getCaller(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::ExprEngine::getInitialState(), getStackFrame(), isCalledByConstructor(), isParentOf(), isReferenceCountingPointerDestructor(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processEndOfFunction(), and clang::ento::ExprEngine::removeDead().
|
inline |
Definition at line 259 of file AnalysisDeclContext.h.
Referenced by clang::ObjCMethodCall::getMessageKind(), clang::ento::ExplodedNode::getParentMap(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), optimizeEdges(), recordFixedType(), supportsNilWithFloatRet(), and clang::ento::ExprEngine::VisitCXXConstructExpr().
|
inline |
Definition at line 263 of file AnalysisDeclContext.h.
References clang::AnalysisDeclContext::getSelfDecl().
Referenced by checkSelfIvarsForInvariantViolation(), clang::ObjCMethodCall::getSelfSVal(), and recordFixedType().
const StackFrameContext * LocationContext::getStackFrame | ( | ) | const |
Definition at line 447 of file AnalysisDeclContext.cpp.
References getParent().
Referenced by clang::ento::NodeBuilderContext::blockCount(), GetAllocationSite(), getArgumentValueString(), clang::ento::MemRegionManager::getBlockDataRegion(), clang::CallEventManager::getCaller(), clang::ento::MemRegionManager::getCompoundLiteralRegion(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::ExprEngine::getInitialState(), clang::ento::ExprEngine::getObjectUnderConstruction(), clang::ProgramPoint::getStackFrame(), clang::ento::getWidenedLoopState(), isInitializationOfVar(), isSynthesizedAccessor(), clang::ento::WorkList::makeBFSBlockDFSContents(), clang::ento::WorkList::makeUnexploredFirst(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::processEndOfFunction(), clang::ento::ExprEngine::ProcessMemberDtor(), llvm::FoldingSetTrait< ObjectState >::Profile(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::removeDead(), reversePropagateInterestingSymbols(), clang::ento::ExprEngine::VisitCXXConstructExpr(), and wasRegionOfInterestModifiedAt().
|
virtual |
Return true if the current LocationContext has no caller context.
Reimplemented in clang::StackFrameContext.
Definition at line 457 of file AnalysisDeclContext.cpp.
References clang::AnalysisDeclContextManager::getStackFrame(), and clang::StackFrameContext::inTopFrame().
Referenced by clang::ento::MemRegionManager::getCXXThisRegion(), and clang::ento::CheckerContext::inTopFrame().
bool LocationContext::isParentOf | ( | const LocationContext * | LC | ) | const |
Definition at line 461 of file AnalysisDeclContext.cpp.
References getParent(), and Parent.
Referenced by GetAllocationSite(), getAsPointeeSymbol(), and isReferenceCountingPointerDestructor().
|
pure virtual |
Implemented in clang::BlockInvocationContext, clang::ScopeContext, and clang::StackFrameContext.
|
static |
Definition at line 356 of file AnalysisDeclContext.cpp.