| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | ExprEngineC.cpp | 33 const LocationContext *LCtx) { in conjureOffsetSymbolOnLocation() argument 36 return svalBuilder.conjureSymbolVal(Elem, LCtx, Ty, Count); in conjureOffsetSymbolOnLocation() 58 const LocationContext *LCtx = (*it)->getLocationContext(); in VisitBinaryOperator() local 59 SVal LeftV = state->getSVal(LHS, LCtx); in VisitBinaryOperator() 60 SVal RightV = state->getSVal(RHS, LCtx); in VisitBinaryOperator() 69 RightV = svalBuilder.conjureSymbolVal(nullptr, getCFGElementRef(), LCtx, in VisitBinaryOperator() 75 evalStore(Tmp2, B, LHS, *it, state->BindExpr(B, LCtx, ExprVal), in VisitBinaryOperator() 89 Count, LCtx); in VisitBinaryOperator() 92 Count, LCtx); in VisitBinaryOperator() 99 state = createTemporaryRegionIfNeeded(state, LCtx, LHS); in VisitBinaryOperator() [all …]
|
| H A D | ExprEngineCXX.cpp | 39 const LocationContext *LCtx = Pred->getLocationContext(); in CreateCXXTemporaryObject() local 41 state = createTemporaryRegionIfNeeded(state, LCtx, tempExpr, ME); in CreateCXXTemporaryObject() 67 const LocationContext *LCtx = Pred->getLocationContext(); in performTrivialCopy() local 99 PostStmt PS(CallExpr, LCtx); in performTrivialCopy() 103 State = State->BindExpr(CallExpr, LCtx, ThisVal); in performTrivialCopy() 105 State = bindReturnValue(Call, LCtx, State); in performTrivialCopy() 133 const LocationContext *LCtx, const ConstructionContext *CC, in computeObjectUnderConstruction() argument 149 return makeElementRegion(State, State->getLValue(Var, LCtx), Ty, in computeObjectUnderConstruction() 156 const CXXMethodDecl *CurCtor = cast<CXXMethodDecl>(LCtx->getDecl()); in computeObjectUnderConstruction() 157 Loc ThisPtr = SVB.getCXXThis(CurCtor, LCtx->getStackFrame()); in computeObjectUnderConstruction() [all …]
|
| H A D | LoopWidening.cpp | 30 const LocationContext *LCtx, in getWidenedLoopState() argument 39 ASTContext &ASTCtx = LCtx->getAnalysisDeclContext()->getASTContext(); in getWidenedLoopState() 40 const StackFrameContext *STC = LCtx->getStackFrame(); in getWidenedLoopState() 55 *LCtx->getDecl()->getBody(), ASTCtx); in getWidenedLoopState() 59 const VarRegion *VarMem = MRMgr.getVarRegion(VD, LCtx); in getWidenedLoopState() 77 return PrevState->invalidateRegions(Regions, Elem, BlockCount, LCtx, true, in getWidenedLoopState()
|
| H A D | ExprEngine.cpp | 478 const LocationContext *LCtx, unsigned Idx) { in setIndexOfElementToConstruct() argument 479 auto Key = std::make_pair(E, LCtx->getStackFrame()); in setIndexOfElementToConstruct() 488 const LocationContext *LCtx) { in getPendingInitLoop() argument 489 const unsigned *V = State->get<PendingInitLoop>({E, LCtx->getStackFrame()}); in getPendingInitLoop() 495 const LocationContext *LCtx) { in removePendingInitLoop() argument 496 auto Key = std::make_pair(E, LCtx->getStackFrame()); in removePendingInitLoop() 504 const LocationContext *LCtx, in setPendingInitLoop() argument 506 auto Key = std::make_pair(E, LCtx->getStackFrame()); in setPendingInitLoop() 516 const LocationContext *LCtx) { in getIndexOfElementToConstruct() argument 518 State->get<IndexOfElementToConstruct>({E, LCtx->getStackFrame()}); in getIndexOfElementToConstruct() [all …]
|
| H A D | ExprEngineCallAndReturn.cpp | 179 const LocationContext *LCtx = Pred->getLocationContext(); in removeDeadOnEndOfFunction() local 180 removeDead(Pred, Dst, dyn_cast<ReturnStmt>(LastSt), LCtx, in removeDeadOnEndOfFunction() 181 LCtx->getAnalysisDeclContext()->getBody(), in removeDeadOnEndOfFunction() 224 const LocationContext *LCtx) { in removeStateTraitsUsedForArrayEvaluation() argument 226 assert(LCtx && "Location context must be provided!"); in removeStateTraitsUsedForArrayEvaluation() 229 if (getPendingInitLoop(State, E, LCtx)) in removeStateTraitsUsedForArrayEvaluation() 230 State = removePendingInitLoop(State, E, LCtx); in removeStateTraitsUsedForArrayEvaluation() 232 if (getIndexOfElementToConstruct(State, E, LCtx)) in removeStateTraitsUsedForArrayEvaluation() 233 State = removeIndexOfElementToConstruct(State, E, LCtx); in removeStateTraitsUsedForArrayEvaluation() 236 if (getPendingArrayDestruction(State, LCtx)) in removeStateTraitsUsedForArrayEvaluation() [all …]
|
| H A D | ProgramState.cpp | 91 ProgramStateRef state, const StackFrameContext *LCtx, in removeDeadBindingsFromEnvironmentAndStore() argument 105 StoreRef newStore = StoreMgr->removeDeadBindings(NewState.getStore(), LCtx, in removeDeadBindingsFromEnvironmentAndStore() 115 const LocationContext *LCtx, in bindLoc() argument 123 return Eng.processRegionChange(State, MR, LCtx); in bindLoc() 130 const LocationContext *LCtx) const { in bindDefaultInitial() 135 return Mgr.getOwningEngine().processRegionChange(State, R, LCtx); in bindDefaultInitial() 139 ProgramState::bindDefaultZero(SVal loc, const LocationContext *LCtx) const { in bindDefaultZero() 144 return Mgr.getOwningEngine().processRegionChange(State, R, LCtx); in bindDefaultZero() 152 const LocationContext *LCtx, bool CausedByPointerEscape, in invalidateRegions() argument 159 return invalidateRegions(Values, Elem, Count, LCtx, CausedByPointerEscape, IS, in invalidateRegions() [all …]
|
| H A D | PrettyStackTraceLocationContext.h | 29 const LocationContext *LCtx; variable 31 PrettyStackTraceLocationContext(const LocationContext *LC) : LCtx(LC) { in PrettyStackTraceLocationContext() 32 assert(LCtx); in PrettyStackTraceLocationContext() 37 LCtx->dumpStack(Out); in print()
|
| H A D | Environment.cpp | 96 const LocationContext *LCtx = Entry.getLocationContext(); in getSVal() local 126 return getSVal(EnvironmentEntry(RE, LCtx), svalBuilder); in getSVal() 132 return lookupExpr(EnvironmentEntry(S, LCtx)); in getSVal() 216 const LocationContext *LCtx, const char *NL, in printJson() argument 226 if (!LCtx) { in printJson() 233 LCtx = LC; in printJson() 240 assert(LCtx); in printJson() 242 Out << "{ \"pointer\": \"" << (const void *)LCtx->getStackFrame() in printJson() 246 LCtx->printJson(Out, NL, Space, IsDot, [&](const LocationContext *LC) { in printJson()
|
| H A D | LoopUnrolling.cpp | 33 const LocationContext *LCtx; member 36 : K(InK), LoopStmt(S), LCtx(L), maxStep(N) {} in LoopState() 50 const LocationContext *getLocationContext() const { return LCtx; } in getLocationContext() 57 ID.AddPointer(LCtx); in Profile() 323 auto LCtx = Pred->getLocationContext(); in updateLoopStack() local 330 LCtx == LS.getHead().getLocationContext()) { in updateLoopStack() 334 LoopState::getNormal(LoopStmt, LCtx, maxVisitOnPath)); in updateLoopStack() 341 LoopState::getNormal(LoopStmt, LCtx, maxVisitOnPath)); in updateLoopStack() 350 LoopState::getNormal(LoopStmt, LCtx, maxVisitOnPath)); in updateLoopStack() 353 LoopState::getUnrolled(LoopStmt, LCtx, innerMaxStep)); in updateLoopStack()
|
| H A D | ExprEngineObjC.cpp | 25 const LocationContext *LCtx = Pred->getLocationContext(); in VisitLvalObjCIvarRefExpr() local 26 SVal baseVal = state->getSVal(Ex->getBase(), LCtx); in VisitLvalObjCIvarRefExpr() 31 Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, location)); in VisitLvalObjCIvarRefExpr() 54 const LocationContext *LCtx = Pred->getLocationContext(); in populateObjCForDestinationSet() local 57 ExprEngine::setWhetherHasMoreIteration(state, S, LCtx, hasElements); in populateObjCForDestinationSet() 70 SymMgr.conjureSymbol(elem, LCtx, T, currBldrCtx->blockCount()); in populateObjCForDestinationSet() 76 nextState = nextState->bindLoc(elementV, V, LCtx); in populateObjCForDestinationSet()
|
| H A D | SymbolManager.cpp | 123 os << getKindStr() << getSymbolID() << '{' << T << ", LC" << LCtx->getID(); in dumpToStream() 125 os << ", S" << S->getID(LCtx->getDecl()->getASTContext()); in dumpToStream() 389 if (LCtx == nullptr) in isLive() 392 if (LCtx != ELCtx) { in isLive() 395 if (LCtx->isParentOf(ELCtx)) in isLive() 405 return LCtx->getAnalysis<RelaxedLiveVariables>()->isLive(Loc, ExprVal); in isLive() 414 if (!LCtx) in isLive() 416 const StackFrameContext *CurrentContext = LCtx->getStackFrame(); in isLive() 428 if (LCtx->getAnalysis<RelaxedLiveVariables>()->isLive(Loc, VR->getDecl())) in isLive()
|
| /freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | CallEvent.h | 159 const LocationContext *LCtx; variable 186 : State(std::move(state)), LCtx(lctx), Origin(E), ElemRef(ElemRef) {} in CallEvent() 190 : State(std::move(state)), LCtx(lctx), Origin(D), ElemRef(ElemRef) {} in CallEvent() 194 : State(Original.State), LCtx(Original.LCtx), Origin(Original.Origin), in CallEvent() 238 const LocationContext *getLocationContext() const { return LCtx; } in getLocationContext() 502 const LocationContext *LCtx, in AnyFunctionCall() argument 504 : CallEvent(E, St, LCtx, ElemRef) {} in AnyFunctionCall() 506 const LocationContext *LCtx, in AnyFunctionCall() argument 508 : CallEvent(D, St, LCtx, ElemRef) {} in AnyFunctionCall() 541 const LocationContext *LCtx, in SimpleFunctionCall() argument [all …]
|
| H A D | ExprEngine.h | 403 const LocationContext *LCtx, 409 const LocationContext *LCtx) { in processRegionChange() argument 410 return processRegionChanges(state, nullptr, MR, MR, LCtx, nullptr); in processRegionChange() 415 const LocationContext *LCtx, const char *NL, 605 const LocationContext *LCtx, QualType T, 622 const LocationContext *LCtx); 627 const LocationContext *LCtx); 632 const LocationContext *LCtx); 645 const LocationContext *LCtx, PointerEscapeKind Kind, 668 const LocationContext *LCtx); [all …]
|
| H A D | SymbolManager.h | 86 const LocationContext *LCtx; variable 93 : SymbolData(ClassKind, sym), Elem(elem), T(t), Count(count), LCtx(lctx), in SymbolConjured() 116 const LocationContext *LCtx, QualType T, unsigned Count, in Profile() argument 120 profile.AddPointer(LCtx); in Profile() 127 Profile(profile, Elem, LCtx, T, Count, SymbolTag); in Profile() 225 const LocationContext *LCtx; variable 233 const LocationContext *LCtx, unsigned count, const void *tag) in SymbolMetadata() argument 234 : SymbolData(ClassKind, sym), R(r), S(s), T(t), LCtx(LCtx), Count(count), in SymbolMetadata() 239 assert(LCtx); in SymbolMetadata() 251 const LocationContext *getLocationContext() const { return LCtx; } in getLocationContext() [all …]
|
| H A D | ProgramState.h | 280 const LocationContext *LCtx, SVal V, 284 const LocationContext *LCtx, 288 const LocationContext *LCtx) const; 297 bindDefaultInitial(SVal loc, SVal V, const LocationContext *LCtx) const; 302 bindDefaultZero(SVal loc, const LocationContext *LCtx) const; 330 const LocationContext *LCtx, bool CausesPointerEscape, 337 unsigned BlockCount, const LocationContext *LCtx, 377 SVal getSVal(const Stmt *S, const LocationContext *LCtx) const; 379 SVal getSValAsScalarOrLoc(const Stmt *Ex, const LocationContext *LCtx) const; 477 void printJson(raw_ostream &Out, const LocationContext *LCtx = nullptr, [all …]
|
| H A D | SValBuilder.h | 176 const LocationContext *LCtx, 179 return SymMgr.conjureSymbol(Elem, LCtx, type, visitCount, symbolTag); 196 const LocationContext *LCtx, 200 const LocationContext *LCtx, 203 const LocationContext *LCtx, 214 const LocationContext *LCtx, 223 const LocationContext *LCtx, 232 const LocationContext *LCtx,
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | CXXSelfAssignmentChecker.cpp | 41 const auto *LCtx = C.getLocationContext(); in checkBeginFunction() local 42 const auto *MD = dyn_cast<CXXMethodDecl>(LCtx->getDecl()); in checkBeginFunction() 50 State->getSVal(SVB.getCXXThis(MD, LCtx->getStackFrame())); in checkBeginFunction() 51 auto Param = SVB.makeLoc(State->getRegion(MD->getParamDecl(0), LCtx)); in checkBeginFunction() 54 ProgramStateRef SelfAssignState = State->bindLoc(Param, ThisVal, LCtx); in checkBeginFunction() 64 ProgramStateRef NonSelfAssignState = State->bindLoc(Param, ParamVal, LCtx); in checkBeginFunction()
|
| H A D | STLAlgorithmModeling.cpp | 136 const auto *LCtx = C.getLocationContext(); in Find() local 138 SVal RetVal = SVB.conjureSymbolVal(nullptr, Elem, LCtx, C.blockCount()); in Find() 139 SVal Param = State->getSVal(CE->getArg(paramNum), LCtx); in Find() 141 auto StateFound = State->BindExpr(CE, LCtx, RetVal); in Find() 150 Elem, LCtx, C.blockCount()); in Find() 163 Param = State->getSVal(CE->getArg(paramNum + 1), LCtx); in Find() 172 Elem, LCtx, C.blockCount()); in Find() 188 auto StateNotFound = State->BindExpr(CE, LCtx, Param); in Find()
|
| H A D | CheckObjCDealloc.cpp | 160 bool isInInstanceDealloc(const CheckerContext &C, const LocationContext *LCtx, 167 const ObjCImplDecl *getContainingObjCImpl(const LocationContext *LCtx) const; 270 const LocationContext *LCtx = C.getLocationContext(); in checkBeginFunction() local 285 for (auto *PropImpl : getContainingObjCImpl(LCtx)->property_impls()) { in checkBeginFunction() 503 const LocationContext *LCtx = C.getLocationContext(); in diagnoseMissingReleases() local 533 cast<ObjCMethodDecl>(LCtx->getDecl())->getClassInterface()) in diagnoseMissingReleases() 607 assert(!LCtx->inTopFrame() || State->get<UnreleasedIvarMap>().isEmpty()); in diagnoseMissingReleases() 631 const LocationContext *LCtx = C.getLocationContext(); in findPropertyOnDeallocatingInstance() local 634 const ObjCImplDecl *Container = getContainingObjCImpl(LCtx); in findPropertyOnDeallocatingInstance() 788 ObjCDeallocChecker::getContainingObjCImpl(const LocationContext *LCtx) const { in getContainingObjCImpl() [all …]
|
| H A D | CStringChecker.cpp | 123 const LocationContext *LCtx, 692 const LocationContext *LCtx = C.getLocationContext(); in CheckOverlap() local 693 SVal firstVal = state->getSVal(First.Expression, LCtx); in CheckOverlap() 694 SVal secondVal = state->getSVal(Second.Expression, LCtx); in CheckOverlap() 743 SVal LengthVal = state->getSVal(Size.Expression, LCtx); in CheckOverlap() 1297 const LocationContext *LCtx = C.getPredecessor()->getLocationContext(); in invalidateBufferAux() local 1301 return State->invalidateRegions(R, Elem, C.blockCount(), LCtx, in invalidateBufferAux() 1450 const LocationContext *LCtx = C.getLocationContext(); in evalCopyCommon() local 1451 SVal sizeVal = state->getSVal(Size.Expression, LCtx); in evalCopyCommon() 1459 SVal destVal = state->getSVal(Dest.Expression, LCtx); in evalCopyCommon() [all …]
|
| H A D | Taint.cpp | 47 const LocationContext *LCtx, in addTaint() argument 49 return addTaint(State, State->getSVal(S, LCtx), Kind); in addTaint() 149 const LocationContext *LCtx, TaintTagType Kind) { in isTainted() argument 150 return !getTaintedSymbolsImpl(State, S, LCtx, Kind, /*ReturnFirstOnly=*/true) in isTainted() 172 const LocationContext *LCtx, in getTaintedSymbols() argument 174 return getTaintedSymbolsImpl(State, S, LCtx, Kind, /*ReturnFirstOnly=*/false); in getTaintedSymbols() 196 const LocationContext *LCtx, in getTaintedSymbolsImpl() argument 199 SVal val = State->getSVal(S, LCtx); in getTaintedSymbolsImpl()
|
| H A D | VirtualCallChecker.cpp | 175 const auto *LCtx = C.getLocationContext(); in registerCtorDtorCallInState() local 176 const auto *MD = dyn_cast_or_null<CXXMethodDecl>(LCtx->getDecl()); in registerCtorDtorCallInState() 186 State->getSVal(SVB.getCXXThis(MD, LCtx->getStackFrame())); in registerCtorDtorCallInState() 200 State->getSVal(SVB.getCXXThis(MD, LCtx->getStackFrame())); in registerCtorDtorCallInState()
|
| /freebsd/contrib/llvm-project/clang/lib/Analysis/ |
| H A D | AnalysisDeclContext.cpp | 503 for (const LocationContext *LCtx = this; LCtx; LCtx = LCtx->getParent()) { in dumpStack() local 504 switch (LCtx->getKind()) { in dumpStack() 508 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl())) in dumpStack() 512 if (const Stmt *S = cast<StackFrameContext>(LCtx)->getCallSite()) { in dumpStack() 519 if (const Decl *D = cast<BlockInvocationContext>(LCtx)->getDecl()) { in dumpStack() 541 for (const LocationContext *LCtx = this; LCtx; LCtx = LCtx->getParent()) { in printJson() local 543 << "{ \"lctx_id\": " << LCtx->getID() << ", \"location_context\": \""; in printJson() 544 switch (LCtx->getKind()) { in printJson() 548 if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl())) in printJson() 554 if (const Stmt *S = cast<StackFrameContext>(LCtx)->getCallSite()) { in printJson() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/ |
| H A D | Taint.h | 31 const LocationContext *LCtx, 66 const LocationContext *LCtx, 84 const LocationContext *LCtx, 103 const LocationContext *LCtx,
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/ |
| H A D | RetainCountDiagnostics.cpp | 171 findArgIdxOfSymbol(ProgramStateRef CurrSt, const LocationContext *LCtx, in findArgIdxOfSymbol() argument 211 const LocationContext *LCtx, in generateDiagnosticsForCallLike() argument 219 SVal X = CurrSt->getSValAsScalarOrLoc(CE->getCallee(), LCtx); in generateDiagnosticsForCallLike() 238 cast<ObjCMessageExpr>(S), CurrSt, LCtx, {nullptr, 0}); in generateDiagnosticsForCallLike() 253 std::optional<CallEventRef<>> CE = Mgr.getCall(S, CurrSt, LCtx, {nullptr, 0}); in generateDiagnosticsForCallLike() 254 auto Idx = findArgIdxOfSymbol(CurrSt, LCtx, Sym, CE); in generateDiagnosticsForCallLike() 479 const LocationContext *LCtx = N->getLocationContext(); in VisitNode() local 505 isSynthesizedAccessor(LCtx->getStackFrame())) { in VisitNode() 506 S = LCtx->getStackFrame()->getCallSite(); in VisitNode() 534 generateDiagnosticsForCallLike(CurrSt, LCtx, CurrV, Sym, S, os); in VisitNode() [all …]
|