Home
last modified time | relevance | path

Searched refs:IfStmt (Results 1 – 25 of 99) sorted by relevance

1234

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DSimplifyBooleanExprCheck.h40 const IfStmt *IfStatement,
44 const IfStmt *IfStatement,
50 void replaceWithReturnCondition(const ASTContext &Context, const IfStmt *If,
53 void replaceWithAssignment(const ASTContext &Context, const IfStmt *If,
58 const IfStmt *If,
H A DMisleadingIndentationCheck.cpp19 static const IfStmt *getPrecedingIf(const SourceManager &SM, in getPrecedingIf()
20 ASTContext *Context, const IfStmt *If) { in getPrecedingIf()
24 if (const auto *PrecedingIf = Parents[0].get<IfStmt>()) { in getPrecedingIf()
35 const IfStmt *If) { in danglingElseCheck()
64 if (const auto *CurrentIf = dyn_cast<IfStmt>(CurrentStmt)) { in missingBracesCheck()
117 if (const auto *If = Result.Nodes.getNodeAs<IfStmt>("if")) in check()
H A DSimplifyBooleanExprCheck.cpp356 bool VisitIfStmt(IfStmt *If) { in VisitIfStmt()
384 !isa_and_nonnull<IfStmt>(parent())) { in VisitIfStmt()
424 !isa_and_nonnull<IfStmt>(parent())) { in VisitIfStmt()
459 CurIf = isa<IfStmt>(*First); in VisitCompoundStmt()
469 auto *If = cast<IfStmt>(*First); in VisitCompoundStmt()
492 auto *SubIf = dyn_cast<IfStmt>(SubStmt); in VisitCompoundStmt()
703 const ASTContext &Context, const IfStmt *IfStatement, in replaceWithThenStatement()
711 const ASTContext &Context, const IfStmt *IfStatement, in replaceWithElseStatement()
730 const ASTContext &Context, const IfStmt *If, const Expr *BoolLiteral, in replaceWithReturnCondition()
743 const IfStmt *If, const Expr *ThenReturn) { in replaceCompoundReturnWithCondition()
[all …]
H A DMisleadingIndentationCheck.h36 const IfStmt *If);
H A DElseAfterReturnCheck.cpp84 static const DeclRefExpr *checkInitDeclUsageInElse(const IfStmt *If) { in checkInitDeclUsageInElse()
101 static const DeclRefExpr *checkConditionVarUsageInElse(const IfStmt *If) { in checkConditionVarUsageInElse()
240 const auto *If = Result.Nodes.getNodeAs<IfStmt>("if"); in check()
H A DDeleteNullPointerCheck.cpp51 const auto *IfWithDelete = Result.Nodes.getNodeAs<IfStmt>("ifWithDelete"); in check()
H A DBracesAroundStatementsCheck.cpp133 } else if (const auto *S = Result.Nodes.getNodeAs<IfStmt>("if")) { in check()
143 if (Else && !isa<IfStmt>(Else)) { in check()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DIdenticalExprChecker.cpp49 bool VisitIfStmt(const IfStmt *I);
106 bool FindIdenticalExprVisitor::VisitIfStmt(const IfStmt *I) { in VisitIfStmt()
117 const IfStmt *InnerIf = dyn_cast<IfStmt>(*CS->body_begin()); in VisitIfStmt()
138 while (const IfStmt *I2 = dyn_cast_or_null<IfStmt>(Else)) { in VisitIfStmt()
418 const IfStmt *IStmt1 = cast<IfStmt>(Stmt1); in isIdenticalStmt()
419 const IfStmt *IStmt2 = cast<IfStmt>(Stmt2); in isIdenticalStmt()
/llvm-project-15.0.7/clang/test/Analysis/
H A Dtraversal-algorithm.mm198 // DFS-next:10 IfStmt
199 // DFS-next:16 IfStmt
200 // DFS-next:22 IfStmt
203 // DFS-next:22 IfStmt
206 // DFS-next:11 IfStmt
207 // DFS-next:22 IfStmt
210 // DFS-next:22 IfStmt
/llvm-project-15.0.7/flang/lib/Semantics/
H A Dcheck-if-stmt.h15 struct IfStmt;
22 void Leave(const parser::IfStmt &);
H A Dcheck-if-stmt.cpp16 void IfStmtChecker::Leave(const parser::IfStmt &ifStmt) { in Leave()
20 if (std::holds_alternative<common::Indirection<parser::IfStmt>>( in Leave()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DBranchCloneCheck.cpp85 if (const auto *IS = Result.Nodes.getNodeAs<IfStmt>("if")) { in check()
92 if (!isa<IfStmt>(Else)) { in check()
105 const IfStmt *Cur = IS; in check()
116 Cur = dyn_cast<IfStmt>(Else); in check()
H A DBoolPointerImplicitConversionCheck.cpp37 const IfStmt *If, in checkImpl()
76 const auto *If = Result.Nodes.getNodeAs<IfStmt>("if"); in check()
H A DRedundantBranchConditionCheck.cpp76 const auto *OuterIf = Result.Nodes.getNodeAs<IfStmt>(OuterIfStr); in check()
77 const auto *InnerIf = Result.Nodes.getNodeAs<IfStmt>(InnerIfStr); in check()
H A DSuspiciousSemicolonCheck.cpp49 const bool IsIfStmt = isa<IfStmt>(Statement); in check()
/llvm-project-15.0.7/clang/lib/AST/
H A DStmt.cpp921 IfStmt::IfStmt(const ASTContext &Ctx, SourceLocation IL, IfStatementKind Kind, in IfStmt() function in IfStmt
948 IfStmt::IfStmt(EmptyShell Empty, bool HasElse, bool HasVar, bool HasInit) in IfStmt() function in IfStmt
955 IfStmt *IfStmt::Create(const ASTContext &Ctx, SourceLocation IL, in Create()
965 alignof(IfStmt)); in Create()
970 IfStmt *IfStmt::CreateEmpty(const ASTContext &Ctx, bool HasElse, bool HasVar, in CreateEmpty()
975 alignof(IfStmt)); in CreateEmpty()
976 return new (Mem) IfStmt(EmptyShell(), HasElse, HasVar, HasInit); in CreateEmpty()
979 VarDecl *IfStmt::getConditionVariable() { in getConditionVariable()
1000 bool IfStmt::isObjCAvailabilityCheck() const { in isObjCAvailabilityCheck()
1011 IfStmt::getNondiscardedCase(const ASTContext &Ctx) const { in getNondiscardedCase()
[all …]
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTTypeTraitsTest.cpp59 EXPECT_TRUE(DNT<Stmt>().isBaseOf(DNT<IfStmt>(), &Distance)); in TEST()
90 ASTNodeKind::getMostDerivedType(DNT<IfStmt>(), DNT<VarDecl>()).isNone()); in TEST()
91 EXPECT_TRUE(ASTNodeKind::getMostDerivedType(DNT<IfStmt>(), in TEST()
110 DNT<IfStmt>(), DNT<VarDecl>()).isNone()); in TEST()
/llvm-project-15.0.7/clang/test/Tooling/
H A Dclang-diff-html.test35 CHECK: // CHECK: Insert IfStmt{{.*}} into IfStmt
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DSwapIfBranches.cpp45 const IfStmt *If = nullptr;
56 If = dyn_cast_or_null<IfStmt>(N->ASTNode.get<Stmt>()); in REGISTER_TWEAK()
/llvm-project-15.0.7/clang/lib/AST/Interp/
H A DByteCodeStmtGen.cpp122 return visitIfStmt(cast<IfStmt>(S)); in visitStmt()
189 bool ByteCodeStmtGen<Emitter>::visitIfStmt(const IfStmt *IS) { in visitIfStmt()
H A DByteCodeStmtGen.h60 bool visitIfStmt(const IfStmt *IS);
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dattr-likelihood-if-branch-weights.cpp50 void IfStmt() { in IfStmt() function
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DASTSelectionTest.cpp323 allChildrenOf(checkNode<IfStmt>(Body.Children[1], in TEST()
343 checkNode<IfStmt>(Body.Children[1], in TEST()
368 checkNode<IfStmt>(Body.Children[2], in TEST()
745 EXPECT_TRUE(isa<IfStmt>((*SelectedCode)[1])); in TEST()
766 EXPECT_TRUE(isa<IfStmt>((*SelectedCode)[1])); in TEST()
781 EXPECT_TRUE(isa<IfStmt>((*SelectedCode)[2])); in TEST()
958 EXPECT_TRUE(isa<IfStmt>((*SelectedCode)[1])); in TEST()
/llvm-project-15.0.7/clang/lib/Tooling/
H A DRefactoringCallbacks.cpp128 if (const IfStmt *Node = Result.Nodes.getNodeAs<IfStmt>(Id)) { in run()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DASTTests.cpp591 IfStmt *FooIf = cast<IfStmt>(cast<CompoundStmt>(FooBody)->body_front()); in TEST()

1234