Home
last modified time | relevance | path

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

12345

/external/clang/lib/AST/
DParentMap.cpp62 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/
DIdenticalExprChecker.cpp119 …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/
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()
/external/llvm-project/clang/lib/AST/
DParentMap.cpp62 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/
DLoopWidening.cpp28 return cast<ForStmt>(LoopStmt)->getCond(); in getLoopCondition()
30 return cast<WhileStmt>(LoopStmt)->getCond(); in getLoopCondition()
32 return cast<DoStmt>(LoopStmt)->getCond(); in getLoopCondition()
DCoreEngine.cpp378 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()
DBugReporter.cpp445 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/
DExprSequence.cpp157 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/
Dfuchsia_lock_impl.c6 int getCond();
8 if (getCond()) in spin_trylock()
/external/llvm-project/clang/lib/StaticAnalyzer/Core/
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()
DCoreEngine.cpp317 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/
DCodeGenPGO.cpp348 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 …]
DCGStmt.cpp573 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 …]
DCoverageMappingGen.cpp679 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/
DRedundantBranchConditionCheck.cpp86 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()
DInfiniteLoopCheck.cpp39 (ForLoop->getCond() && in isChanged()
40 ExprMutationAnalyzer(*ForLoop->getCond(), *Context).isMutated(Var)); in isChanged()
/external/llvm-project/clang/lib/CodeGen/
DCodeGenPGO.cpp491 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 …]
DCGStmt.cpp681 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 …]
DCoverageMappingGen.cpp1061 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/
DTransEmptyStatementsAndDealloc.cpp98 Expr *condE = S->getCond(); in VisitIfStmt()
110 Expr *condE = S->getCond(); in VisitWhileStmt()
120 Expr *condE = S->getCond(); in VisitDoStmt()
/external/clang/lib/Analysis/
DCFG.cpp1934 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/
DTransEmptyStatementsAndDealloc.cpp100 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/
DCFG.cpp2700 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 …]
DLiveVariables.cpp286 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/
DStmt.h917 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

12345