/external/clang/lib/AST/ |
D | ParentMap.cpp | 62 M[BCO->getCond()] = S; in BuildParentMap() 63 BuildParentMap(M, BCO->getCond(), OV_Opaque); in BuildParentMap() 185 return DirectChild == cast<ForStmt>(P)->getCond(); in isConsumedExpr() 187 return DirectChild == cast<WhileStmt>(P)->getCond(); in isConsumedExpr() 189 return DirectChild == cast<DoStmt>(P)->getCond(); in isConsumedExpr() 191 return DirectChild == cast<IfStmt>(P)->getCond(); in isConsumedExpr() 195 return DirectChild == cast<SwitchStmt>(P)->getCond(); in isConsumedExpr()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | IdenticalExprChecker.cpp | 119 …if (InnerIf && isIdenticalStmt(AC->getASTContext(), I->getCond(), InnerIf->getCond(), /*ignoreSide… in VisitIfStmt() 120 PathDiagnosticLocation ELoc(InnerIf->getCond(), BR.getSourceManager(), AC); in VisitIfStmt() 137 const Expr *Cond1 = I->getCond(); in VisitIfStmt() 140 const Expr *Cond2 = I2->getCond(); in VisitIfStmt() 378 if (!isIdenticalStmt(Ctx, ForStmt1->getCond(), ForStmt2->getCond(), in isIdenticalStmt() 393 if (!isIdenticalStmt(Ctx, DStmt1->getCond(), DStmt2->getCond(), in isIdenticalStmt() 405 if (!isIdenticalStmt(Ctx, WStmt1->getCond(), WStmt2->getCond(), in isIdenticalStmt() 417 if (!isIdenticalStmt(Ctx, IStmt1->getCond(), IStmt2->getCond(), in isIdenticalStmt()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
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()
|
/external/llvm-project/clang/lib/AST/ |
D | ParentMap.cpp | 62 M[BCO->getCond()] = S; in BuildParentMap() 63 BuildParentMap(M, BCO->getCond(), OV_Opaque); in BuildParentMap() 197 return DirectChild == cast<ForStmt>(P)->getCond(); in isConsumedExpr() 199 return DirectChild == cast<WhileStmt>(P)->getCond(); in isConsumedExpr() 201 return DirectChild == cast<DoStmt>(P)->getCond(); in isConsumedExpr() 203 return DirectChild == cast<IfStmt>(P)->getCond(); in isConsumedExpr() 207 return DirectChild == cast<SwitchStmt>(P)->getCond(); in isConsumedExpr()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | LoopWidening.cpp | 28 return cast<ForStmt>(LoopStmt)->getCond(); in getLoopCondition() 30 return cast<WhileStmt>(LoopStmt)->getCond(); in getLoopCondition() 32 return cast<DoStmt>(LoopStmt)->getCond(); in getLoopCondition()
|
D | CoreEngine.cpp | 378 HandleBranch(cast<AbstractConditionalOperator>(Term)->getCond(), in HandleBlockExit() 386 HandleBranch(cast<ChooseExpr>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 403 HandleBranch(cast<DoStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 407 HandleBranch(cast<CXXForRangeStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 411 HandleBranch(cast<ForStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 420 HandleBranch(cast<IfStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 451 SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(), in HandleBlockExit() 459 HandleBranch(cast<WhileStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
|
D | BugReporter.cpp | 445 if (allowNestedContexts || cast<ChooseExpr>(Parent)->getCond() == S) in getEnclosingStmtLocation() 454 cast<AbstractConditionalOperator>(Parent)->getCond() == S) in getEnclosingStmtLocation() 469 if (cast<IfStmt>(Parent)->getCond() != S) in getEnclosingStmtLocation() 477 if (cast<WhileStmt>(Parent)->getCond() != S) in getEnclosingStmtLocation() 938 S = cast<AbstractConditionalOperator>(S)->getCond(); in cleanUpLocation() 942 S = cast<ChooseExpr>(S)->getCond(); in cleanUpLocation() 1913 return cast<IfStmt>(S)->getCond() == Cond; in isConditionForTerminator() 1915 return cast<ForStmt>(S)->getCond() == Cond; in isConditionForTerminator() 1917 return cast<WhileStmt>(S)->getCond() == Cond; in isConditionForTerminator() 1919 return cast<DoStmt>(S)->getCond() == Cond; in isConditionForTerminator() [all …]
|
/external/llvm-project/clang-tools-extra/clang-tidy/utils/ |
D | ExprSequence.cpp | 157 return TheIfStmt->getCond(); in getSequenceSuccessor() 160 return TheIfStmt->getCond(); in getSequenceSuccessor() 166 return TheSwitchStmt->getCond(); in getSequenceSuccessor() 169 return TheSwitchStmt->getCond(); in getSequenceSuccessor() 175 return TheWhileStmt->getCond(); in getSequenceSuccessor()
|
/external/llvm-project/clang/test/Analysis/ |
D | fuchsia_lock_impl.c | 6 int getCond(); 8 if (getCond()) in spin_trylock()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Core/ |
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()
|
D | CoreEngine.cpp | 317 HandleBranch(cast<AbstractConditionalOperator>(Term)->getCond(), in HandleBlockExit() 325 HandleBranch(cast<ChooseExpr>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 341 HandleBranch(cast<DoStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 345 HandleBranch(cast<CXXForRangeStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 349 HandleBranch(cast<ForStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 358 HandleBranch(cast<IfStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit() 388 SwitchNodeBuilder builder(Pred, B, cast<SwitchStmt>(Term)->getCond(), in HandleBlockExit() 396 HandleBranch(cast<WhileStmt>(Term)->getCond(), Term, B, Pred); in HandleBlockExit()
|
/external/clang/lib/CodeGen/ |
D | CodeGenPGO.cpp | 348 CountMap[S->getCond()] = CondCount; in VisitWhileStmt() 349 Visit(S->getCond()); in VisitWhileStmt() 369 CountMap[S->getCond()] = CondCount; in VisitDoStmt() 370 Visit(S->getCond()); in VisitDoStmt() 402 if (S->getCond()) { in VisitForStmt() 403 CountMap[S->getCond()] = CondCount; in VisitForStmt() 404 Visit(S->getCond()); in VisitForStmt() 436 CountMap[S->getCond()] = CondCount; in VisitCXXForRangeStmt() 437 Visit(S->getCond()); in VisitCXXForRangeStmt() 461 Visit(S->getCond()); in VisitSwitchStmt() [all …]
|
D | CGStmt.cpp | 573 LexicalScope ConditionScope(*this, S.getCond()->getSourceRange()); in EmitIfStmt() 584 if (ConstantFoldsToSimpleInteger(S.getCond(), CondConstant, in EmitIfStmt() 613 EmitBranchOnBoolExpr(S.getCond(), ThenBlock, ElseBlock, in EmitIfStmt() 691 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitWhileStmt() 708 createProfileWeightsForLoop(S.getCond(), getProfileCount(S.getBody()))); in EmitWhileStmt() 775 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitDoStmt() 791 createProfileWeightsForLoop(S.getCond(), BackedgeCount)); in EmitDoStmt() 839 if (S.getCond()) { in EmitForStmt() 857 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitForStmt() 860 createProfileWeightsForLoop(S.getCond(), getProfileCount(S.getBody()))); in EmitForStmt() [all …]
|
D | CoverageMappingGen.cpp | 679 propagateCounts(CondCount, S->getCond()); in VisitWhileStmt() 701 propagateCounts(CondCount, S->getCond()); in VisitDoStmt() 731 if (const Expr *Cond = S->getCond()) { in VisitForStmt() 785 Visit(S->getCond()); in VisitSwitchStmt() 843 extendRegion(S->getCond()); in VisitIfStmt() 850 propagateCounts(ParentCount, S->getCond()); in VisitIfStmt() 891 Visit(E->getCond()); in VisitAbstractConditionalOperator()
|
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
D | RedundantBranchConditionCheck.cpp | 86 dyn_cast<BinaryOperator>(InnerIf->getCond()->IgnoreParenImpCasts()); in check() 88 if (isa<DeclRefExpr>(InnerIf->getCond()->IgnoreParenImpCasts()) || in check() 135 cast<BinaryOperator>(InnerIf->getCond()->IgnoreParenImpCasts()); in check()
|
D | InfiniteLoopCheck.cpp | 39 (ForLoop->getCond() && in isChanged() 40 ExprMutationAnalyzer(*ForLoop->getCond(), *Context).isMutated(Var)); in isChanged()
|
/external/llvm-project/clang/lib/CodeGen/ |
D | CodeGenPGO.cpp | 491 CountMap[S->getCond()] = CondCount; in VisitWhileStmt() 492 Visit(S->getCond()); in VisitWhileStmt() 512 CountMap[S->getCond()] = CondCount; in VisitDoStmt() 513 Visit(S->getCond()); in VisitDoStmt() 545 if (S->getCond()) { in VisitForStmt() 546 CountMap[S->getCond()] = CondCount; in VisitForStmt() 547 Visit(S->getCond()); in VisitForStmt() 581 CountMap[S->getCond()] = CondCount; in VisitCXXForRangeStmt() 582 Visit(S->getCond()); in VisitCXXForRangeStmt() 608 Visit(S->getCond()); in VisitSwitchStmt() [all …]
|
D | CGStmt.cpp | 681 LexicalScope ConditionScope(*this, S.getCond()->getSourceRange()); in EmitIfStmt() 692 if (ConstantFoldsToSimpleInteger(S.getCond(), CondConstant, in EmitIfStmt() 728 EmitBranchOnBoolExpr(S.getCond(), ThenBlock, ElseBlock, Count, LH); in EmitIfStmt() 790 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitWhileStmt() 816 S.getCond(), getProfileCount(S.getBody()), S.getBody()); in EmitWhileStmt() 889 llvm::Value *BoolCondVal = EvaluateExprAsBool(S.getCond()); in EmitDoStmt() 915 createProfileWeightsForLoop(S.getCond(), BackedgeCount)); in EmitDoStmt() 949 if (!S.getCond()) { in EmitForStmt() 951 } else if (!S.getCond()->EvaluateAsInt(Result, getContext())) { in EmitForStmt() 974 if (S.getCond()) { in EmitForStmt() [all …]
|
D | CoverageMappingGen.cpp | 1061 propagateCounts(CondCount, S->getCond()); in VisitWhileStmt() 1065 auto Gap = findGapAreaBetween(S->getCond(), S->getBody()); in VisitWhileStmt() 1088 propagateCounts(CondCount, S->getCond()); in VisitDoStmt() 1126 if (const Expr *Cond = S->getCond()) { in VisitForStmt() 1202 Visit(S->getCond()); in VisitSwitchStmt() 1272 extendRegion(S->getCond()); in VisitIfStmt() 1279 propagateCounts(ParentCount, S->getCond()); in VisitIfStmt() 1282 auto Gap = findGapAreaBetween(S->getCond(), S->getThen()); in VisitIfStmt() 1329 Visit(E->getCond()); in VisitAbstractConditionalOperator()
|
/external/llvm-project/clang/lib/ARCMigrate/ |
D | TransEmptyStatementsAndDealloc.cpp | 98 Expr *condE = S->getCond(); in VisitIfStmt() 110 Expr *condE = S->getCond(); in VisitWhileStmt() 120 Expr *condE = S->getCond(); in VisitDoStmt()
|
/external/clang/lib/Analysis/ |
D | CFG.cpp | 1934 const TryResult& KnownVal = tryEvaluateBool(C->getCond()); in VisitChooseExpr() 1938 return addStmt(C->getCond()); in VisitChooseExpr() 2008 dyn_cast<BinaryOperator>(C->getCond()->IgnoreParens())) in VisitConditionalOperator() 2016 const TryResult& KnownVal = tryEvaluateBool(C->getCond()); in VisitConditionalOperator() 2020 Expr *condExpr = C->getCond(); in VisitConditionalOperator() 2256 dyn_cast<BinaryOperator>(I->getCond()->IgnoreParens())) in VisitIfStmt() 2267 const TryResult &KnownVal = tryEvaluateBool(I->getCond()); in VisitIfStmt() 2277 CFGBlock *LastBlock = addStmt(I->getCond()); in VisitIfStmt() 2491 Expr *C = F->getCond(); in VisitForStmt() 2809 Expr *C = W->getCond(); in VisitWhileStmt() [all …]
|
/external/clang/lib/ARCMigrate/ |
D | TransEmptyStatementsAndDealloc.cpp | 100 Expr *condE = S->getCond(); in VisitIfStmt() 112 Expr *condE = S->getCond(); in VisitWhileStmt() 122 Expr *condE = S->getCond(); in VisitDoStmt()
|
/external/llvm-project/clang/lib/Analysis/ |
D | CFG.cpp | 2700 const TryResult& KnownVal = tryEvaluateBool(C->getCond()); in VisitChooseExpr() 2704 return addStmt(C->getCond()); in VisitChooseExpr() 2777 dyn_cast<BinaryOperator>(C->getCond()->IgnoreParens())) in VisitConditionalOperator() 2785 const TryResult& KnownVal = tryEvaluateBool(C->getCond()); in VisitConditionalOperator() 2789 Expr *condExpr = C->getCond(); in VisitConditionalOperator() 3045 : dyn_cast<BinaryOperator>(I->getCond()->IgnoreParens()); in VisitIfStmt() 3057 const TryResult &KnownVal = tryEvaluateBool(I->getCond()); in VisitIfStmt() 3067 LastBlock = addStmt(I->getCond()); in VisitIfStmt() 3430 Expr *C = F->getCond(); in VisitForStmt() 3766 Expr *C = W->getCond(); in VisitWhileStmt() [all …]
|
D | LiveVariables.cpp | 286 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<IfStmt>(S)->getCond()); in Visit() 293 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<WhileStmt>(S)->getCond()); in Visit() 300 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<DoStmt>(S)->getCond()); in Visit() 307 AddLiveExpr(val.liveExprs, LV.ESetFact, cast<ForStmt>(S)->getCond()); in Visit()
|
/external/clang/include/clang/AST/ |
D | Stmt.h | 917 const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function 924 Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]); } in getCond() function 994 const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function 998 Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function 1075 Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]); } in getCond() function 1076 const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function 1120 Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]); } in getCond() function 1121 const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function 1186 Expr *getCond() { return reinterpret_cast<Expr*>(SubExprs[COND]); } in getCond() function 1191 const Expr *getCond() const { return reinterpret_cast<Expr*>(SubExprs[COND]);} in getCond() function
|