reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 1829 extern const internal::VariadicDynCastAllOfMatcher<Stmt, IfStmt> ifStmt;

References

tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  325   REGISTER_MATCHER(ifStmt);
tools/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp
  273       ifStmt(allOf(
tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
  556       stmt(anyOf(ifStmt(), switchStmt(), conditionalOperator(), AssertLikeM,
tools/clang/tools/extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp
   92                 ifStmt(ConditionWithSideEffect),
tools/clang/tools/extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.cpp
   21       ifStmt(hasCondition(findAll(implicitCastExpr(
tools/clang/tools/extra/clang-tidy/bugprone/BranchCloneCheck.cpp
   62       ifStmt(stmt().bind("if"),
   63              hasParent(stmt(unless(ifStmt(hasElse(equalsBoundNode("if")))))),
tools/clang/tools/extra/clang-tidy/bugprone/MultipleStatementMacroCheck.cpp
   61       stmt(anyOf(ifStmt(hasThen(Inner)), ifStmt(hasElse(Inner)).bind("else"),
   61       stmt(anyOf(ifStmt(hasThen(Inner)), ifStmt(hasElse(Inner)).bind("else"),
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
   22       stmt(anyOf(ifStmt(hasThen(nullStmt().bind("semi")),
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
  116         stmt(anyOf(ifStmt(hasCondition(StringCompareCallExpr)),
tools/clang/tools/extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp
   70       ifStmt(eachOf(hasThen(MatchedCallExpr), hasElse(MatchedCallExpr)));
tools/clang/tools/extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
   45     Finder->addMatcher(ifStmt(hasParent(ifStmt()), unless(hasElse(anything())))
   45     Finder->addMatcher(ifStmt(hasParent(ifStmt()), unless(hasElse(anything())))
tools/clang/tools/extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp
   58       stmt(anyOf(ifStmt(Any), whileStmt(Any), doStmt(Condition),
tools/clang/tools/extra/clang-tidy/misc/StaticAssertCheck.cpp
   74       ifStmt(hasCondition(Condition), unless(isInTemplateInstantiation()))
tools/clang/tools/extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
  126   Finder->addMatcher(ifStmt().bind("if"), this);
tools/clang/tools/extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
   43       ifStmt(hasCondition(anyOf(PointerCondition, BinaryPointerCheckCondition)),
tools/clang/tools/extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
   27           ifStmt(unless(isConstexpr()),
tools/clang/tools/extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
  291               hasParent(stmt(anyOf(ifStmt(), whileStmt()), has(declStmt())))),
tools/clang/tools/extra/clang-tidy/readability/MisleadingIndentationCheck.cpp
  109   Finder->addMatcher(ifStmt(hasElse(stmt())).bind("if"), this);
  111       compoundStmt(has(stmt(anyOf(ifStmt(), forStmt(), whileStmt()))))
tools/clang/tools/extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
   68   Finder->addMatcher(ifStmt(hasCondition(CallToGetAsBool)), Callback);
tools/clang/tools/extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
  426       ifStmt(isExpansionInMainFile(),
  446     Finder->addMatcher(ifStmt(isExpansionInMainFile(),
  452     Finder->addMatcher(ifStmt(isExpansionInMainFile(),
  453                               unless(hasParent(ifStmt())),
  478     Finder->addMatcher(ifStmt(hasThen(Then), hasElse(Else)).bind(Id), this);
  481         ifStmt(unless(hasParent(ifStmt())), hasThen(Then), hasElse(Else))
  481         ifStmt(unless(hasParent(ifStmt())), hasThen(Then), hasElse(Else))
  492               ifStmt(hasThen(returnsBool(Value)), unless(hasElse(stmt())))),
tools/clang/tools/extra/unittests/clang-tidy/OverlappingReplacementsTest.cpp
   47     Finder->addMatcher(ifStmt().bind(BoundIf), this);
tools/clang/tools/extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp
   35       ifStmt(hasCondition(expr().bind(C)), hasThen(stmt().bind(T)),
tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   36                              ifStmt(hasParent(compoundStmt()))));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
  315   StatementMatcher MixedTypes = stmt(anyOf(ifStmt(), binaryOperator()));
 1069                       ifStmt(isConstexpr()), LanguageMode::Cxx17OrLater));
 1070   EXPECT_TRUE(notMatches("void baz() { if (1 > 0) {} }", ifStmt(isConstexpr()),
 2289             stmt(allOf(ifStmt().bind("if"),
 2294     stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if")))))));
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
  848     ifStmt(hasCondition(cxxBoolLiteral(equals(true))));
 1581     "void f() { if (true) if(true) {} }", ifStmt().bind(""),
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
 1090                       ifStmt(hasThen(cxxBoolLiteral(equals(true))))));
 1092                          ifStmt(hasThen(cxxBoolLiteral(equals(true))))));
 1094                       ifStmt(hasElse(cxxBoolLiteral(equals(true))))));
 1096                          ifStmt(hasElse(cxxBoolLiteral(equals(true))))));
 1336     ifStmt(hasCondition(cxxBoolLiteral(equals(true))));
 1804     ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))));
 1882     ifStmt(hasConditionVariableStatement(declStmt()))));
 1885     ifStmt(hasConditionVariableStatement(declStmt()))));
 1891     ifStmt(hasConditionVariableStatement(declStmt()))));
 1959     compoundStmt(forEachDescendant(ifStmt().bind("if")),
 2027                  has(compoundStmt(hasAnySubstatement(ifStmt())))),
 2053     ifStmt(stmt().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
 2127     integerLiteral(equals(42), hasAncestor(ifStmt()))));
 2188     compoundStmt(hasParent(ifStmt()))));
 2191     compoundStmt(hasParent(ifStmt()))));
 2194     compoundStmt(hasParent(ifStmt()))));
 2498     "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),
 2502     "void f() { if (1) { for (;;) { } } }", ifStmt().bind("if"),
tools/clang/unittests/Tooling/RangeSelectorTest.cpp
  533   TestMatch Match = matchCode(Code, ifStmt().bind(ID));
  547   TestMatch Match = matchCode(Code, ifStmt().bind(ID));
tools/clang/unittests/Tooling/RefactoringCallbacksTest.cpp
   82                   ifStmt(hasCondition(implicitCastExpr(hasSourceExpression(
   94       ifStmt(hasCondition(cxxBoolLiteral(equals(false)))).bind("id"), Callback);
tools/clang/unittests/Tooling/StencilTest.cpp
  128       Snippet, ifStmt(hasCondition(expr().bind(Condition)),
  147       Snippet, ifStmt(hasCondition(expr().bind(Condition)),
  164   auto StmtMatch = matchStmt(Snippet, ifStmt(hasCondition(stmt().bind("a1")),
tools/clang/unittests/Tooling/TransformerTest.cpp
  452   testRule(makeRule(ifStmt(hasCondition(expr().bind(C)),