Home
last modified time | relevance | path

Searched refs:ifStmt (Results 1 – 25 of 37) sorted by relevance

12

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSpuriouslyWakeUpFunctionsCheck.cpp62 ifStmt(HasWaitDescendantCpp, in registerMatchers()
63 unless(hasDescendant(mapAnyOf(ifStmt, whileStmt, forStmt, doStmt) in registerMatchers()
69 ifStmt(HasWaitDescendantC, in registerMatchers()
71 hasDescendant(mapAnyOf(ifStmt, whileStmt, forStmt, doStmt) in registerMatchers()
H A DAssignmentInIfConditionCheck.cpp20 Finder->addMatcher(ifStmt(hasCondition(forEachDescendant( in registerMatchers()
24 Finder->addMatcher(ifStmt(hasCondition(forEachDescendant( in registerMatchers()
H A DMultipleStatementMacroCheck.cpp61 stmt(anyOf(ifStmt(hasThen(Inner)), ifStmt(hasElse(Inner)).bind("else"), in registerMatchers()
H A DRedundantBranchConditionCheck.cpp50 ifStmt( in registerMatchers()
58 ifStmt(hasCondition(anyOf( in registerMatchers()
H A DBranchCloneCheck.cpp73 ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())), in registerMatchers()
75 hasParent(stmt(unless(ifStmt(hasElse(equalsBoundNode("if")))))), in registerMatchers()
H A DUnusedReturnValueCheck.cpp152 ifStmt(eachOf(hasThen(MatchedCallExpr), hasElse(MatchedCallExpr))); in registerMatchers()
H A DBoolPointerImplicitConversionCheck.cpp23 ifStmt( in registerMatchers()
H A DSuspiciousSemicolonCheck.cpp22 stmt(anyOf(ifStmt(hasThen(nullStmt().bind("semi")), in registerMatchers()
H A DAssertSideEffectCheck.cpp105 ifStmt(ConditionWithSideEffect), in registerMatchers()
H A DSuspiciousStringCompareCheck.cpp113 stmt(anyOf(mapAnyOf(ifStmt, whileStmt, doStmt, forStmt) in registerMatchers()
/llvm-project-15.0.7/flang/lib/Semantics/
H A Dcheck-if-stmt.cpp16 void IfStmtChecker::Leave(const parser::IfStmt &ifStmt) { in Leave() argument
19 std::get<parser::UnlabeledStatement<parser::ActionStmt>>(ifStmt.t)}; in Leave()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/hicpp/
H A DMultiwayPathsCoveredCheck.cpp45 Finder->addMatcher(ifStmt(hasParent(ifStmt()), unless(hasElse(anything()))) in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DMisleadingIndentationCheck.cpp109 Finder->addMatcher(ifStmt(hasElse(stmt())).bind("if"), this); in registerMatchers()
111 compoundStmt(has(stmt(anyOf(ifStmt(), forStmt(), whileStmt())))) in registerMatchers()
H A DDeleteNullPointerCheck.cpp40 ifStmt(hasCondition(anyOf(PointerExpr, BinaryPointerCheckCondition)), in registerMatchers()
H A DRedundantSmartptrGetCheck.cpp82 Finder->addMatcher(ifStmt(hasCondition(CallToGetAsBool)), Callback); in registerMatchersForGetArrowStart()
H A DBracesAroundStatementsCheck.cpp108 Finder->addMatcher(ifStmt().bind("if"), this); in registerMatchers()
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DRefactoringCallbacksTest.cpp82 ifStmt(hasCondition(implicitCastExpr(hasSourceExpression( in TEST()
94 ifStmt(hasCondition(cxxBoolLiteral(equals(false)))).bind("id"), Callback); in TEST()
/llvm-project-15.0.7/clang/unittests/ASTMatchers/
H A DASTMatchersNarrowingTest.cpp458 StatementMatcher MixedTypes = stmt(anyOf(ifStmt(), binaryOperator())); in TEST_P()
496 hasAncestor(mapAnyOf(ifStmt, forStmt))))); in TEST_P()
1811 matches("void baz() { if ! consteval {} }", ifStmt(isConsteval()))); in TEST_P()
1813 ifStmt(isConsteval()))); in TEST_P()
1817 ifStmt(isConsteval()))); in TEST_P()
1819 notMatches("void baz() { if (1 > 0) {} }", ifStmt(isConsteval()))); in TEST_P()
1841 notMatches("void baz() { if (1 > 0) {} }", ifStmt(isConstexpr()))); in TEST_P()
1865 ifStmt(hasInitStatement(anything())))); in TEST_P()
1876 ifStmt(hasInitStatement(anything())))); in TEST_P()
1885 ifStmt(hasInitStatement(anything())))); in TEST_P()
[all …]
H A DASTMatchersTraversalTest.cpp2009 ifStmt(hasCondition(cxxBoolLiteral(equals(true)))); in TEST()
3169 auto M = cxxForRangeStmt(hasDescendant(ifStmt())); in TEST()
4068 auto M = ifStmt(hasCondition(cxxOperatorCallExpr( in TEST()
4860 ifStmt(hasConditionVariableStatement(declStmt())))); in TEST()
4863 ifStmt(hasConditionVariableStatement(declStmt())))); in TEST()
4869 ifStmt(hasConditionVariableStatement(declStmt())))); in TEST()
4969 compoundStmt(forEachDescendant(ifStmt().bind("if")), in TEST()
5206 integerLiteral(equals(42), hasAncestor(ifStmt())))); in TEST()
5267 compoundStmt(hasParent(ifStmt())))); in TEST()
5270 compoundStmt(hasParent(ifStmt())))); in TEST()
[all …]
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTContextParentMapTest.cpp36 ifStmt(hasParent(compoundStmt())))); in TEST()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvm/
H A DPreferIsaOrDynCastInConditionalsCheck.cpp58 ifStmt(Any), whileStmt(Any), doStmt(Condition), in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DStaticAssertCheck.cpp69 ifStmt(hasCondition(Condition), unless(isInTemplateInstantiation())) in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/unittests/clang-tidy/
H A DOverlappingReplacementsTest.cpp47 Finder->addMatcher(ifStmt().bind(BoundIf), this); in registerMatchers()
/llvm-project-15.0.7/flang/lib/Lower/
H A DPFTBuilder.cpp136 void convertIfStmt(const parser::IfStmt &ifStmt, parser::CharBlock position, in convertIfStmt() argument
157 lower::pft::Evaluation{ifStmt, pftParentStack.back(), position, label}); in convertIfStmt()
158 Pre(std::get<parser::UnlabeledStatement<parser::ActionStmt>>(ifStmt.t)); in convertIfStmt()
539 lower::pft::Evaluation &ifStmt = *ifBodyList.begin(); in rewriteIfGotos() local
540 ifStmt.negateCondition = true; in rewriteIfGotos()
541 ifStmt.lexicalSuccessor = firstStmt(&*successorIt); in rewriteIfGotos()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DNumberObjectConversionChecker.cpp273 ifStmt(allOf( in checkASTCodeBody()

12