|
clang 23.0.0git
|
It represents a stack frame of the call stack. More...
#include "clang/Analysis/AnalysisDeclContext.h"
Public Member Functions | |
| StackFrame (AnalysisDeclContext *ADC, const StackFrame *Parent, const void *Data, const Expr *E, const CFGBlock *Block, unsigned BlockCount, unsigned Index, int64_t ID) | |
| ~StackFrame ()=default | |
| LLVM_ATTRIBUTE_RETURNS_NONNULL AnalysisDeclContext * | getAnalysisDeclContext () const |
| const StackFrame * | getParent () const |
| It might return null. | |
| int64_t | getID () const |
| bool | isParentOf (const StackFrame *SF) const |
| const Decl * | getDecl () const |
| CFG * | getCFG () const |
| template<typename T> | |
| T * | getAnalysis () const |
| const ParentMap & | getParentMap () const |
| const ImplicitParamDecl * | getSelfDecl () const |
| const void * | getData () const |
| const Expr * | getCallSite () const |
| const CFGBlock * | getCallSiteBlock () const |
| bool | inTopFrame () const |
| unsigned | getIndex () const |
| CFGElement | getCallSiteCFGElement () const |
| void | printJson (raw_ostream &Out, const char *NL="\n", unsigned int Space=0, bool IsDot=false, std::function< void(const StackFrame *)> printMoreInfoPerStackFrame=[](const StackFrame *) {}) const |
Prints out the call stack in json format. | |
| LLVM_DUMP_METHOD void | dumpStack (raw_ostream &Out) const |
| Prints out the call stack. | |
| LLVM_DUMP_METHOD void | dump () const |
| void | Profile (llvm::FoldingSetNodeID &ID) |
Static Public Member Functions | |
| static void | Profile (llvm::FoldingSetNodeID &ID, AnalysisDeclContext *ADC, const StackFrame *SF, const void *Data, const Expr *E, const CFGBlock *Block, unsigned BlockCount, unsigned Index) |
Friends | |
| class | StackFrameManager |
It represents a stack frame of the call stack.
Definition at line 205 of file AnalysisDeclContext.h.
|
inline |
Definition at line 234 of file AnalysisDeclContext.h.
References StackFrame().
Referenced by dumpStack(), getParent(), isParentOf(), printJson(), Profile(), StackFrame(), and StackFrameManager.
|
default |
| LLVM_DUMP_METHOD void StackFrame::dump | ( | ) | const |
Definition at line 509 of file AnalysisDeclContext.cpp.
References printJson().
| void StackFrame::dumpStack | ( | raw_ostream & | Out | ) | const |
Prints out the call stack.
| Out | The out stream. |
Definition at line 446 of file AnalysisDeclContext.cpp.
References getAnalysisDeclContext(), clang::AnalysisDeclContext::getASTContext(), clang::AnalysisDeclContext::getFunctionName(), clang::ASTContext::getSourceManager(), printLocation(), SM, StackFrame(), and clang::PrintingPolicy::TerseOutput.
|
inline |
Definition at line 258 of file AnalysisDeclContext.h.
Referenced by clang::ento::ExplodedNode::getAnalysis().
|
inline |
Definition at line 245 of file AnalysisDeclContext.h.
Referenced by clang::ento::SValBuilder::conjureSymbolVal(), dumpStack(), clang::ento::PathSensitiveBugReporter::emitReport(), findTopAutosynthesizedParentStackFrame(), clang::ento::SValBuilder::getBlockPointer(), clang::ento::ExplodedNode::getCFGBlock(), clang::ento::CheckerContext::getCurrentAnalysisDeclContext(), clang::ento::ObjCMethodCall::getInitialStackFrameContents(), getLocationForCaller(), clang::ento::AnyFunctionCall::getRuntimeDefinition(), clang::ento::ExplodedNode::getStmtForDiagnostics(), clang::ento::MemRegionManager::getVarRegion(), clang::ento::getWidenedLoopState(), clang::ento::isPossiblyEscaped(), clang::ento::retaincountchecker::isSynthesizedAccessor(), printIndicesOfElementsToConstructJson(), clang::ProgramPoint::printJson(), printJson(), printObjectsUnderConstructionJson(), printPendingInitLoopJson(), clang::ento::ExprEngine::processCallExit(), Profile(), clang::ento::ExprEngine::removeDeadOnEndOfFunction(), clang::ento::PathDiagnosticCallPiece::setCallee(), shouldRemoveDeadBindings(), timeTraceMetadata(), and clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode().
|
inline |
Definition at line 267 of file AnalysisDeclContext.h.
Referenced by clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::CallEventManager::getCaller(), clang::ento::StackHintGeneratorForSymbol::getMessage(), clang::ento::ExplodedNode::getStmtForDiagnostics(), clang::ento::MemRegionManager::getVarRegion(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::updateObjectsUnderConstruction(), and clang::ento::retaincountchecker::RefCountReportVisitor::VisitNode().
|
inline |
Definition at line 269 of file AnalysisDeclContext.h.
Referenced by clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::CallEventManager::getCaller(), getLocationForCaller(), clang::ento::ExprEngine::processCallExit(), and clang::ento::ExprEngine::updateObjectsUnderConstruction().
|
inline |
Definition at line 276 of file AnalysisDeclContext.h.
Referenced by clang::ento::CallEvent::getConstructionContext().
|
inline |
Definition at line 256 of file AnalysisDeclContext.h.
Referenced by clang::ento::CoreEngine::ExecuteWorkList(), clang::FunctionExitPoint::getBlock(), clang::ento::ExplodedNode::getCFG(), clang::CallEnter::getEntry(), clang::ento::PathSensitiveBugReport::getStmt(), and clang::ento::NoStateChangeFuncVisitor::VisitNode().
|
inline |
Definition at line 265 of file AnalysisDeclContext.h.
Referenced by getStackOrCaptureRegionForDeclContext().
|
inline |
Definition at line 254 of file AnalysisDeclContext.h.
Referenced by clang::ento::retaincountchecker::RetainCountChecker::checkBeginFunction(), checkInvariantViolation(), checkSelfIvarsForInvariantViolation(), clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::PathDiagnosticLocation::create(), clang::ento::PathDiagnosticLocation::createDeclBegin(), clang::ento::PathDiagnosticLocation::createDeclEnd(), clang::ento::CoreEngine::ExecuteWorkList(), clang::ento::ExprEngine::ExecuteWorkList(), exitingDestructor(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::finalizeVisitor(), findExecutedLines(), clang::ento::CallEventManager::getCaller(), clang::ento::ExplodedNode::getCodeDecl(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::ParamVarRegion::getDecl(), clang::ento::PathSensitiveBugReport::getDeclWithIssue(), getEnclosingStmtLocation(), clang::ento::AnyCXXConstructorCall::getInitialStackFrameContents(), clang::ento::AnyFunctionCall::getInitialStackFrameContents(), clang::ento::BlockCall::getInitialStackFrameContents(), clang::ento::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::ObjCMethodCall::getInitialStackFrameContents(), clang::ento::ExprEngine::getInitialState(), getStackOrCaptureRegionForDeclContext(), clang::ento::MemRegionManager::getVarRegion(), clang::ento::getWidenedLoopState(), clang::ento::isCapturedByReference(), isInMIGCall(), clang::ento::retaincountchecker::isSynthesizedAccessor(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processBranch(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::ExprEngine::ProcessMemberDtor(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), wasDifferentDeclUsedForInlining(), clang::ento::NoOwnershipChangeVisitor::wasModifiedInFunction(), and willObjectBeAnalyzedLater().
|
inline |
Definition at line 250 of file AnalysisDeclContext.h.
|
inline |
Definition at line 274 of file AnalysisDeclContext.h.
Referenced by clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::CallEventManager::getCaller(), getLocationForCaller(), clang::ento::ExprEngine::processCallExit(), and clang::ento::ExprEngine::updateObjectsUnderConstruction().
|
inline |
It might return null.
Definition at line 248 of file AnalysisDeclContext.h.
References StackFrame().
Referenced by clang::ento::ExprEngine::computeObjectUnderConstruction(), clang::ento::CoreEngine::enqueueEndOfFunction(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::finalizeVisitor(), findTopAutosynthesizedParentStackFrame(), getCalleeNode(), clang::ento::CallEventManager::getCaller(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::ExprEngine::getInitialState(), getStackOrCaptureRegionForDeclContext(), inTopFrame(), isInMIGCall(), isParentOf(), clang::ento::Environment::printJson(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processEndOfFunction(), Profile(), clang::ento::ExprEngine::removeDead(), clang::ento::ExprEngine::updateObjectsUnderConstruction(), and willObjectBeAnalyzedLater().
|
inline |
Definition at line 260 of file AnalysisDeclContext.h.
Referenced by addContextEdges(), getEnclosingStmtLocation(), clang::ento::ObjCMethodCall::getMessageKind(), clang::ento::ExplodedNode::getParentMap(), and optimizeEdges().
|
inline |
self if this AnalysisDeclContext wraps an ObjCMethodDecl or nullptr otherwise. Definition at line 263 of file AnalysisDeclContext.h.
Referenced by checkSelfIvarsForInvariantViolation(), and clang::ento::ProgramState::getSelfSVal().
|
inline |
Definition at line 272 of file AnalysisDeclContext.h.
References getParent().
Referenced by clang::ento::ExprEngine::ExecuteWorkList(), getCalleeNode(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::CheckerContext::inTopFrame(), clang::ento::ExprEngine::processBranch(), clang::ento::ExprEngine::processCFGBlockEntrance(), and clang::ento::ExprEngine::processEndOfFunction().
| bool StackFrame::isParentOf | ( | const StackFrame * | SF | ) | const |
Definition at line 426 of file AnalysisDeclContext.cpp.
References getParent(), and StackFrame().
Referenced by GetAllocationSite(), clang::ento::SymbolReaper::isLive(), isVarAnInterestingCondition(), and clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode().
| void StackFrame::printJson | ( | raw_ostream & | Out, |
| const char * | NL = "\n", | ||
| unsigned int | Space = 0, | ||
| bool | IsDot = false, | ||
| std::function< void(const StackFrame *)> | printMoreInfoPerStackFrame = [](const StackFrame *) {} ) const |
Prints out the call stack in json format.
| Out | The out stream. |
| NL | The newline. |
| Space | The space count for indentation. |
| IsDot | Whether the output format is dot. |
| printMoreInfoPerStackFrame | A callback to print more information for each stack frame, for example: [&](const StackFrame *SF) { SF->dump(); }
StackFrame(AnalysisDeclContext *ADC, const StackFrame *Parent, const void *Data, const Expr *E, const CFGBlock *Block, unsigned BlockCount, unsigned Index, int64_t ID) Definition AnalysisDeclContext.h:234 |
Definition at line 470 of file AnalysisDeclContext.cpp.
References std::function, getAnalysisDeclContext(), clang::AnalysisDeclContext::getASTContext(), clang::ASTContext::getSourceManager(), clang::Indent(), clang::printSourceLocationAsJson(), SM, StackFrame(), and clang::PrintingPolicy::TerseOutput.
Referenced by dump(), clang::ento::Environment::printJson(), and printStateTraitWithStackFrameJson().
| void StackFrame::Profile | ( | llvm::FoldingSetNodeID & | ID | ) |
Definition at line 399 of file AnalysisDeclContext.cpp.
References getAnalysisDeclContext(), getParent(), and Profile().
Referenced by clang::StackFrameManager::getStackFrame(), and Profile().
|
inlinestatic |
Definition at line 304 of file AnalysisDeclContext.h.
References StackFrame().
|
friend |
Definition at line 206 of file AnalysisDeclContext.h.
References StackFrame(), and StackFrameManager.
Referenced by StackFrameManager.