| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | IdenticalExprChecker.cpp | 118 …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 D | ErrnoChecker.cpp | 82 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 D | ParentMap.cpp | 62 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 D | ExprSequence.cpp | 156 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 D | UnrollLoopsCheck.cpp | 125 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 D | function-specialization-constant-integers.ll | 10 declare i1 @getCond() 27 %cond.end = call i1 @getCond() 31 %cond2.end = call i1 @getCond()
|
| H A D | function-specialization-always-inline.ll | 14 declare i1 @getCond() 38 %cond2.end = call i1 @getCond()
|
| H A D | function-specialization-loop.ll | 16 declare i1 @getCond() 40 %cond2.end = call i1 @getCond()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | LoopWidening.cpp | 33 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 D | CoreEngine.cpp | 347 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 D | BugReporter.cpp | 687 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 D | fuchsia_lock_impl.c | 6 int getCond(void); 8 if (getCond()) in spin_trylock()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | RedundantBranchConditionCheck.cpp | 96 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 D | InfiniteLoopCheck.cpp | 40 (ForLoop->getCond() && in isChanged() 41 ExprMutationAnalyzer(*ForLoop->getCond(), *Context).isMutated(Var)); in isChanged()
|
| /llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/ |
| H A D | TypeErasedDataflowAnalysis.cpp | 82 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 D | CodeGenPGO.cpp | 506 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 D | CoverageMappingGen.cpp | 1098 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 D | CGStmt.cpp | 775 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 D | TransEmptyStatementsAndDealloc.cpp | 98 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 D | TosaToSCF.cpp | 72 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 D | CFG.cpp | 2741 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 D | LiveVariables.cpp | 291 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 D | SimplifyBooleanExprCheck.cpp | 365 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 D | FunctionCognitiveComplexityCheck.cpp | 278 if (!TraverseStmt(Node->getCond())) in TraverseIfStmt() 284 if (!traverseStmtWithIncreasedNestingLevel(Node->getCond())) in TraverseIfStmt()
|
| /llvm-project-15.0.7/clang/include/clang/AST/ |
| H A D | EvaluatedExprVisitor.h | 59 if (E->getCond()->isValueDependent()) in VisitChooseExpr()
|