Home
last modified time | relevance | path

Searched refs:getCond (Results 1 – 25 of 86) sorted by relevance

1234

/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DIdenticalExprChecker.cpp118 …if (InnerIf && isIdenticalStmt(AC->getASTContext(), I->getCond(), InnerIf->getCond(), /*IgnoreSide… in VisitIfStmt()
119 PathDiagnosticLocation ELoc(InnerIf->getCond(), BR.getSourceManager(), AC); in VisitIfStmt()
136 const Expr *Cond1 = I->getCond(); in VisitIfStmt()
139 const Expr *Cond2 = I2->getCond(); in VisitIfStmt()
382 if (!isIdenticalStmt(Ctx, ForStmt1->getCond(), ForStmt2->getCond(), in isIdenticalStmt()
397 if (!isIdenticalStmt(Ctx, DStmt1->getCond(), DStmt2->getCond(), in isIdenticalStmt()
409 if (!isIdenticalStmt(Ctx, WStmt1->getCond(), WStmt2->getCond(), in isIdenticalStmt()
421 if (!isIdenticalStmt(Ctx, IStmt1->getCond(), IStmt2->getCond(), in isIdenticalStmt()
H A DErrnoChecker.cpp82 CondFound = (S == cast<IfStmt>(ParentS)->getCond()); in isInCondition()
85 CondFound = (S == cast<ForStmt>(ParentS)->getCond()); in isInCondition()
88 CondFound = (S == cast<DoStmt>(ParentS)->getCond()); in isInCondition()
91 CondFound = (S == cast<WhileStmt>(ParentS)->getCond()); in isInCondition()
94 CondFound = (S == cast<SwitchStmt>(ParentS)->getCond()); in isInCondition()
97 CondFound = (S == cast<ConditionalOperator>(ParentS)->getCond()); in isInCondition()
/llvm-project-15.0.7/clang/lib/AST/
H A DParentMap.cpp62 M[BCO->getCond()] = S; in BuildParentMap()
63 BuildParentMap(M, BCO->getCond(), OV_Opaque); in BuildParentMap()
196 return DirectChild == cast<ForStmt>(P)->getCond(); in isConsumedExpr()
198 return DirectChild == cast<WhileStmt>(P)->getCond(); in isConsumedExpr()
200 return DirectChild == cast<DoStmt>(P)->getCond(); in isConsumedExpr()
202 return DirectChild == cast<IfStmt>(P)->getCond(); in isConsumedExpr()
206 return DirectChild == cast<SwitchStmt>(P)->getCond(); in isConsumedExpr()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DExprSequence.cpp156 return TheIfStmt->getCond(); in getSequenceSuccessor()
159 return TheIfStmt->getCond(); in getSequenceSuccessor()
165 return TheSwitchStmt->getCond(); in getSequenceSuccessor()
168 return TheSwitchStmt->getCond(); in getSequenceSuccessor()
174 return TheWhileStmt->getCond(); in getSequenceSuccessor()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DUnrollLoopsCheck.cpp125 const Expr *Conditional = ForLoop->getCond(); in hasKnownBounds()
154 return ForLoop->getCond(); in getCondExpr()
156 return WhileLoop->getCond(); in getCondExpr()
158 return DoWhileLoop->getCond(); in getCondExpr()
160 return CXXRangeLoop->getCond(); in getCondExpr()
175 const Expr *Conditional = ForLoop->getCond(); in hasLargeNumIterations()
/llvm-project-15.0.7/llvm/test/Transforms/FunctionSpecialization/
H A Dfunction-specialization-constant-integers.ll10 declare i1 @getCond()
27 %cond.end = call i1 @getCond()
31 %cond2.end = call i1 @getCond()
H A Dfunction-specialization-always-inline.ll14 declare i1 @getCond()
38 %cond2.end = call i1 @getCond()
H A Dfunction-specialization-loop.ll16 declare i1 @getCond()
40 %cond2.end = call i1 @getCond()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DLoopWidening.cpp33 return cast<ForStmt>(LoopStmt)->getCond(); in getLoopCondition()
35 return cast<WhileStmt>(LoopStmt)->getCond(); in getLoopCondition()
37 return cast<DoStmt>(LoopStmt)->getCond(); in getLoopCondition()
H A DCoreEngine.cpp347 HandleBranch(cast<AbstractConditionalOperator>(Term)->getCond(), in HandleBlockExit()
355 HandleBranch(cast<ChooseExpr>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
371 HandleBranch(cast<DoStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
375 HandleBranch(cast<CXXForRangeStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
379 HandleBranch(cast<ForStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
389 HandleBranch(cast<IfStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
419 SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(), in HandleBlockExit()
427 HandleBranch(cast<WhileStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
H A DBugReporter.cpp687 if (cast<IfStmt>(Parent)->getCond() != S) in getEnclosingStmtLocation()
695 if (cast<WhileStmt>(Parent)->getCond() != S) in getEnclosingStmtLocation()
1374 return cast<IfStmt>(S)->getCond() == Cond; in isConditionForTerminator()
1376 return cast<ForStmt>(S)->getCond() == Cond; in isConditionForTerminator()
1378 return cast<WhileStmt>(S)->getCond() == Cond; in isConditionForTerminator()
1380 return cast<DoStmt>(S)->getCond() == Cond; in isConditionForTerminator()
1382 return cast<ChooseExpr>(S)->getCond() == Cond; in isConditionForTerminator()
1386 return cast<SwitchStmt>(S)->getCond() == Cond; in isConditionForTerminator()
1388 return cast<BinaryConditionalOperator>(S)->getCond() == Cond; in isConditionForTerminator()
1391 return CO->getCond() == Cond || in isConditionForTerminator()
[all …]
/llvm-project-15.0.7/clang/test/Analysis/
H A Dfuchsia_lock_impl.c6 int getCond(void);
8 if (getCond()) in spin_trylock()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DRedundantBranchConditionCheck.cpp96 if (isChangedBefore(OuterIf->getCond(), InnerIfVar, OuterIfVar, CondVar, in check()
112 dyn_cast<BinaryOperator>(InnerIf->getCond()->IgnoreParenImpCasts()); in check()
114 if (isa<DeclRefExpr>(InnerIf->getCond()->IgnoreParenImpCasts()) || in check()
161 cast<BinaryOperator>(InnerIf->getCond()->IgnoreParenImpCasts()); in check()
H A DInfiniteLoopCheck.cpp40 (ForLoop->getCond() && in isChanged()
41 ExprMutationAnalyzer(*ForLoop->getCond(), *Context).isMutated(Var)); in isChanged()
/llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/
H A DTypeErasedDataflowAnalysis.cpp82 auto *Cond = S->getCond(); in VisitIfStmt()
88 auto *Cond = S->getCond(); in VisitWhileStmt()
94 auto *Cond = S->getCond(); in VisitDoStmt()
100 auto *Cond = S->getCond(); in VisitForStmt()
113 auto *Cond = S->getCond(); in VisitConditionalOperator()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCodeGenPGO.cpp506 CountMap[S->getCond()] = CondCount; in VisitWhileStmt()
507 Visit(S->getCond()); in VisitWhileStmt()
527 CountMap[S->getCond()] = CondCount; in VisitDoStmt()
528 Visit(S->getCond()); in VisitDoStmt()
560 if (S->getCond()) { in VisitForStmt()
562 Visit(S->getCond()); in VisitForStmt()
596 CountMap[S->getCond()] = CondCount; in VisitCXXForRangeStmt()
597 Visit(S->getCond()); in VisitCXXForRangeStmt()
623 Visit(S->getCond()); in VisitSwitchStmt()
663 Visit(S->getCond()); in VisitIfStmt()
[all …]
H A DCoverageMappingGen.cpp1098 propagateCounts(CondCount, S->getCond()); in VisitWhileStmt()
1116 createBranchRegion(S->getCond(), BodyCount, in VisitWhileStmt()
1136 propagateCounts(CondCount, S->getCond()); in VisitDoStmt()
1146 createBranchRegion(S->getCond(), BodyCount, in VisitDoStmt()
1186 if (const Expr *Cond = S->getCond()) { in VisitForStmt()
1206 createBranchRegion(S->getCond(), BodyCount, in VisitForStmt()
1245 createBranchRegion(S->getCond(), BodyCount, in VisitCXXForRangeStmt()
1280 Visit(S->getCond()); in VisitSwitchStmt()
1381 extendRegion(S->getCond()); in VisitIfStmt()
1455 propagateCounts(ParentCount, E->getCond()); in VisitAbstractConditionalOperator()
[all …]
H A DCGStmt.cpp775 LexicalScope ConditionScope(*this, S.getCond()->getSourceRange()); in EmitIfStmt()
786 if (ConstantFoldsToSimpleInteger(S.getCond(), CondConstant, in EmitIfStmt()
884 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitWhileStmt()
980 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitDoStmt()
1001 createProfileWeightsForLoop(S.getCond(), BackedgeCount)); in EmitDoStmt()
1034 !S.getCond() || S.getCond()->EvaluateAsInt(Result, getContext()); in EmitForStmt()
1059 if (S.getCond()) { in EmitForStmt()
1082 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitForStmt()
1167 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitCXXForRangeStmt()
1972 llvm::Value *CondV = EmitScalarExpr(S.getCond()); in EmitSwitchStmt()
[all …]
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DTransEmptyStatementsAndDealloc.cpp98 Expr *condE = S->getCond(); in VisitIfStmt()
110 Expr *condE = S->getCond(); in VisitWhileStmt()
120 Expr *condE = S->getCond(); in VisitDoStmt()
/llvm-project-15.0.7/mlir/lib/Conversion/TosaToSCF/
H A DTosaToSCF.cpp72 rewriter.create<tensor::ExtractOp>(op.getLoc(), op.getCond()); in matchAndRewrite()
97 inlineWhileCase(op.getCond(), newWhile.getBefore(), rewriter, true); in matchAndRewrite()
/llvm-project-15.0.7/clang/lib/Analysis/
H A DCFG.cpp2741 return addStmt(C->getCond()); in VisitChooseExpr()
2826 Expr *condExpr = C->getCond(); in VisitConditionalOperator()
3529 Expr *C = F->getCond(); in VisitForStmt()
3860 Expr *C = W->getCond(); in VisitWhileStmt()
4129 if (Stmt *C = D->getCond()) { in VisitDoStmt()
4648 if (Expr *C = S->getCond()) { in VisitCXXForRangeStmt()
4665 if (S->getCond()) in VisitCXXForRangeStmt()
5458 if (Stmt *C = I->getCond()) in VisitIfStmt()
5477 if (Stmt *C = F->getCond()) in VisitForStmt()
5487 if (Stmt *C = W->getCond()) in VisitWhileStmt()
[all …]
H A DLiveVariables.cpp291 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<IfStmt>(S)->getCond()); in Visit()
298 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<WhileStmt>(S)->getCond()); in Visit()
305 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<DoStmt>(S)->getCond()); in Visit()
312 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<ForStmt>(S)->getCond()); in Visit()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DSimplifyBooleanExprCheck.cpp365 Expr *Cond = If->getCond()->IgnoreImplicit(); in VisitIfStmt()
723 replacementExpression(Context, Negated, Ternary->getCond()); in replaceWithCondition()
734 replacementExpression(Context, Negated, If->getCond()); in replaceWithReturnCondition()
745 "return " + replacementExpression(Context, Negated, If->getCond()); in replaceCompoundReturnWithCondition()
760 replacementExpression(Context, Negated, IfAssign->getCond()); in replaceWithAssignment()
H A DFunctionCognitiveComplexityCheck.cpp278 if (!TraverseStmt(Node->getCond())) in TraverseIfStmt()
284 if (!traverseStmtWithIncreasedNestingLevel(Node->getCond())) in TraverseIfStmt()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DEvaluatedExprVisitor.h59 if (E->getCond()->isValueDependent()) in VisitChooseExpr()

1234