Lines Matching +full:sens +full:-

1 //===- AnalysisDeclContext.cpp - Analysis context for Path Sens analysis --===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
96 Stmt *Body = FD->getBody(); in getBody()
98 Body = CoroBody->getBody(); in getBody()
99 if (ADCMgr && ADCMgr->synthesizeBodies()) { in getBody()
100 Stmt *SynthesizedBody = ADCMgr->getBodyFarm().getBody(FD); in getBody()
109 Stmt *Body = MD->getBody(); in getBody()
110 if (ADCMgr && ADCMgr->synthesizeBodies()) { in getBody()
111 Stmt *SynthesizedBody = ADCMgr->getBodyFarm().getBody(MD); in getBody()
119 return BD->getBody(); in getBody()
121 return FunTmpl->getTemplatedDecl()->getBody(); in getBody()
140 return Tmp && Body->getBeginLoc().isValid(); in isBodyAutosynthesizedFromModelFile()
143 /// Returns true if \param VD is an Objective-C implicit 'self' parameter.
145 return isa_and_nonnull<ImplicitParamDecl>(VD) && VD->getName() == "self"; in isSelfDecl()
150 return MD->getSelfDecl(); in getSelfDecl()
153 for (const auto &I : BD->captures()) { in getSelfDecl()
164 const CXXRecordDecl *parent = CXXMethod->getParent(); in getSelfDecl()
165 if (!parent->isLambda()) in getSelfDecl()
168 for (const auto &LC : parent->captures()) { in getSelfDecl()
185 stmt = e->IgnoreParens(); in registerForcedBlockExpression()
193 stmt = e->IgnoreParens(); in getBlockForRegisteredExpression()
195 forcedBlkExprs->find(stmt); in getBlockForRegisteredExpression()
196 assert(itr != forcedBlkExprs->end()); in getBlockForRegisteredExpression()
197 return itr->second; in getBlockForRegisteredExpression()
206 for (CFG::synthetic_stmt_iterator I = TheCFG->synthetic_stmt_begin(), in addParentsForSyntheticStmts()
207 E = TheCFG->synthetic_stmt_end(); in addParentsForSyntheticStmts()
209 PM.setParent(I->first, PM.getParent(I->second)); in addParentsForSyntheticStmts()
218 cfg = CFG::buildCFG(D, getBody(), &D->getASTContext(), cfgBuildOptions); in getCFG()
236 CFG::buildCFG(D, getBody(), &D->getASTContext(), cfgBuildOptions); in getUnoptimizedCFG()
275 getCFG()->dump(getASTContext().getLangOpts(), ShowColors); in dumpCFG()
282 for (const auto *I : C->inits()) { in getParentMap()
283 PM->addStmt(I->getInit()); in getParentMap()
298 FD->hasBody(FD); in getContext()
325 const DeclContext *DC = D->getDeclContext()->getEnclosingNamespaceContext(); in isInStdNamespace()
330 while (const DeclContext *Parent = ND->getParent()) { in isInStdNamespace()
336 return ND->isStdNamespace(); in isInStdNamespace()
342 const ASTContext &Ctx = D->getASTContext(); in getFunctionName()
345 OS << FD->getQualifiedNameAsString(); in getFunctionName()
351 for (const auto &P : FD->parameters()) { in getFunctionName()
352 if (P != *FD->param_begin()) in getFunctionName()
354 OS << P->getType(); in getFunctionName()
360 PresumedLoc Loc = Ctx.getSourceManager().getPresumedLoc(D->getLocation()); in getFunctionName()
369 // FIXME: copy-pasted from CGDebugInfo.cpp. in getFunctionName()
370 OS << (OMD->isInstanceMethod() ? '-' : '+') << '['; in getFunctionName()
371 const DeclContext *DC = OMD->getDeclContext(); in getFunctionName()
373 OS << OID->getName(); in getFunctionName()
375 OS << OID->getName(); in getFunctionName()
377 if (OC->IsClassExtension()) { in getFunctionName()
378 OS << OC->getClassInterface()->getName(); in getFunctionName()
380 OS << OC->getIdentifier()->getNameStart() << '(' in getFunctionName()
381 << OC->getIdentifier()->getNameStart() << ')'; in getFunctionName()
384 OS << OCD->getClassInterface()->getName() << '(' << OCD->getName() << ')'; in getFunctionName()
386 OS << ' ' << OMD->getSelector().getAsString() << ']'; in getFunctionName()
396 return ADCMgr->getLocationContextManager(); in getLocationContextManager()
399 //===----------------------------------------------------------------------===//
401 //===----------------------------------------------------------------------===//
423 //===----------------------------------------------------------------------===//
425 //===----------------------------------------------------------------------===//
458 //===----------------------------------------------------------------------===//
460 //===----------------------------------------------------------------------===//
467 LC = LC->getParent(); in getStackFrame()
473 return getStackFrame()->inTopFrame(); in inTopFrame()
478 const LocationContext *Parent = LC->getParent(); in isParentOf()
497 ASTContext &Ctx = getAnalysisDeclContext()->getASTContext(); in dumpStack()
502 getAnalysisDeclContext()->getASTContext().getSourceManager(); in dumpStack()
505 for (const LocationContext *LCtx = this; LCtx; LCtx = LCtx->getParent()) { in dumpStack()
506 switch (LCtx->getKind()) { in dumpStack()
510 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl())) in dumpStack()
514 if (const Stmt *S = cast<StackFrameContext>(LCtx)->getCallSite()) { in dumpStack()
516 printLocation(Out, SM, S->getBeginLoc()); in dumpStack()
521 if (const Decl *D = cast<BlockInvocationContext>(LCtx)->getDecl()) { in dumpStack()
523 printLocation(Out, SM, D->getBeginLoc()); in dumpStack()
535 ASTContext &Ctx = getAnalysisDeclContext()->getASTContext(); in printJson()
540 getAnalysisDeclContext()->getASTContext().getSourceManager(); in printJson()
543 for (const LocationContext *LCtx = this; LCtx; LCtx = LCtx->getParent()) { in printJson()
545 << "{ \"lctx_id\": " << LCtx->getID() << ", \"location_context\": \""; in printJson()
546 switch (LCtx->getKind()) { in printJson()
550 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl())) in printJson()
551 Out << D->getQualifiedNameAsString(); in printJson()
556 if (const Stmt *S = cast<StackFrameContext>(LCtx)->getCallSite()) { in printJson()
557 printSourceLocationAsJson(Out, S->getBeginLoc(), SM); in printJson()
566 if (const Decl *D = cast<BlockInvocationContext>(LCtx)->getDecl()) { in printJson()
568 printSourceLocationAsJson(Out, D->getBeginLoc(), SM); in printJson()
577 if (LCtx->getParent()) in printJson()
585 //===----------------------------------------------------------------------===//
587 //===----------------------------------------------------------------------===//
603 for (auto *Child : S->children()) in VisitStmt()
609 // Non-local variables are also directly modified. in VisitDeclRefExpr()
610 if (const auto *VD = dyn_cast<VarDecl>(DR->getDecl())) { in VisitDeclRefExpr()
611 if (!VD->hasLocalStorage()) { in VisitDeclRefExpr()
620 IgnoredContexts.insert(BR->getBlockDecl()); in VisitBlockExpr()
621 Visit(BR->getBlockDecl()->getBody()); in VisitBlockExpr()
625 for (PseudoObjectExpr::semantics_iterator it = PE->semantics_begin(), in VisitPseudoObjectExpr()
626 et = PE->semantics_end(); it != et; ++it) { in VisitPseudoObjectExpr()
629 Semantic = OVE->getSourceExpr(); in VisitPseudoObjectExpr()
650 for (const auto &CI : BD->captures()) { in LazyInitializeReferencedDecls()
651 BV->push_back(CI.getVariable(), BC); in LazyInitializeReferencedDecls()
656 F.Visit(BD->getBody()); in LazyInitializeReferencedDecls()
669 return llvm::make_range(V->begin(), V->end()); in getReferencedBlockVars()
679 //===----------------------------------------------------------------------===//
681 //===----------------------------------------------------------------------===//