| /llvm-project-15.0.7/clang/unittests/ASTMatchers/ |
| H A D | ASTMatchersTraversalTest.cpp | 841 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST() 854 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST() 883 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST() 3888 auto lambdaExplicitCapture = declRefExpr( in TEST() 3890 auto lambdaImplicitCapture = declRefExpr( in TEST() 3931 auto M = declRefExpr(to(varDecl(hasName("s1")))); in TEST() 3968 has(declRefExpr(to(varDecl(hasName("s1"))))), in TEST() 4674 declRefExpr(throughUsingDecl(anything())))); in TEST() 4677 declRefExpr(throughUsingDecl(anything())))); in TEST() 6293 declRefExpr( in TEST() [all …]
|
| H A D | ASTMatchersNarrowingTest.cpp | 65 EXPECT_TRUE(matches(input, declRefExpr(isExpandedFromMacro("MY_MACRO")))); in TEST_P() 172 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P() 177 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P() 183 hasArgument(0, declRefExpr(to(varDecl()))), in TEST_P() 649 hasOperands(declRefExpr(to(varDecl(hasName("s1")))), in TEST_P() 651 hasOperands(declRefExpr(to(varDecl(hasName("s2")))), in TEST_P() 661 hasOperands(declRefExpr(to(varDecl(hasName("s1")))), in TEST_P() 663 hasOperands(declRefExpr(to(varDecl(hasName("s2")))), in TEST_P() 2856 declRefExpr(to(namedDecl(hasName("t")))))))); in TEST_P() 3700 on(declRefExpr(to( in TEST_P() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/ |
| H A D | InefficientStringConcatenationCheck.cpp | 37 hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType)))); in registerMatchers() 42 hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))), in registerMatchers() 48 hasArgument(0, declRefExpr(BasicStringType, in registerMatchers() 51 hasArgument(1, stmt(hasDescendant(declRefExpr( in registerMatchers()
|
| H A D | InefficientVectorOperationCheck.cpp | 107 onImplicitObjectArgument(declRefExpr(to(TargetVarDecl)))) in addMatcher() 114 declRefExpr(to(varDecl(equalsBoundNode(LoopInitVarName))))); in addMatcher() 153 anyOf(declRefExpr(supportedContainerTypesMatcher()), in addMatcher()
|
| H A D | InefficientAlgorithmCheck.cpp | 44 on(declRefExpr( in registerMatchers() 52 on(declRefExpr(hasDeclaration( in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | SpuriouslyWakeUpFunctionsCheck.cpp | 21 auto HasUniqueLock = hasDescendant(declRefExpr( in registerMatchers() 35 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers() 42 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers() 49 declRefExpr(to(varDecl(hasType(references(recordDecl( in registerMatchers()
|
| H A D | RedundantBranchConditionCheck.cpp | 52 declRefExpr(hasDeclaration(ImmutableVar)).bind(OuterIfVar1Str), in registerMatchers() 55 hasEitherOperand(declRefExpr(hasDeclaration(ImmutableVar)) in registerMatchers() 59 declRefExpr(hasDeclaration( in registerMatchers() 65 declRefExpr(hasDeclaration(varDecl( in registerMatchers()
|
| H A D | BoolPointerImplicitConversionCheck.cpp | 28 ignoringParenImpCasts(anyOf(declRefExpr().bind("expr"), in registerMatchers() 81 ignoringParenImpCasts(anyOf(declRefExpr(to(equalsNode(D))), in check()
|
| H A D | NotNullTerminatedResultCheck.cpp | 525 declRefExpr(to(varDecl(hasInitializer(ignoringImpCasts(InnerMatcher)))))); in AST_MATCHER_P() 531 auto DREHasDefinition = ignoringImpCasts(declRefExpr( in AST_MATCHER_P() 534 hasLHS(declRefExpr(to(varDecl(equalsBoundNode(VarDeclName))))), in AST_MATCHER_P() 556 auto Container = ignoringImpCasts(cxxMemberCallExpr(hasDescendant(declRefExpr( in registerMatchers() 599 ignoringImpCasts(declRefExpr(to(varDecl(hasInitializer(WrongLength))))); in registerMatchers() 609 declRefExpr(to(varDecl(hasInitializer(CallExprReturnWithoutInc))))); in registerMatchers() 639 auto DestArrayTyDecl = declRefExpr( in registerMatchers() 645 declRefExpr(allOf(to(varDecl(AnyOfCharTy).bind(DestVarDeclName)), in registerMatchers() 656 hasLHS(anyOf(hasDescendant(declRefExpr(to(varDecl( in registerMatchers() 658 hasDescendant(declRefExpr( in registerMatchers() [all …]
|
| H A D | MisplacedOperatorInStrlenInAllocCheck.cpp | 51 declRefExpr(hasDeclaration(Alloc0Func))))); in registerMatchers() 55 declRefExpr(hasDeclaration(Alloc1Func))))); in registerMatchers()
|
| H A D | UseAfterMoveCheck.cpp | 101 hasAncestor(declRefExpr( in inDecltypeOrTemplateArg() 281 auto DeclRefMatcher = declRefExpr(hasDeclaration(equalsNode(MovedVariable)), in getDeclRefs() 300 declRefExpr(hasDeclaration(equalsNode(MovedVariable))).bind("declref"); in getReinits() 405 hasArgument(0, declRefExpr().bind("arg")), in registerMatchers()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | LoopUnrolling.cpp | 89 declRefExpr(to(varDecl(hasType(isInteger())).bind(BindName))) in simpleCondition() 101 declRefExpr(to(varDecl(VarNodeMatcher)))))), in changeIntBoundNode() 104 declRefExpr(to(varDecl(VarNodeMatcher))))))); in changeIntBoundNode() 110 declRefExpr(to(varDecl(VarNodeMatcher))), in callByRef() 119 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))), in assignedToRef() 120 declRefExpr(to(varDecl(VarNodeMatcher))))))))); in assignedToRef() 127 hasUnaryOperand(declRefExpr(hasDeclaration(VarNodeMatcher)))); in getAddrTo() 151 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher() 159 hasUnaryOperand(declRefExpr( in forLoopMatcher()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | DeclRefExprUtils.cpp | 48 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"); in constReferenceDeclRefExprs() 103 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs() 114 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs() 124 declRefExpr(equalsNode(&DeclRef)), in isCopyConstructorArgument() 138 declRefExpr(equalsNode(&DeclRef)), in isCopyAssignmentArgument()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/ |
| H A D | StrCatAppendCheck.cpp | 50 hasArgument(0, ignoringImpCasts(declRefExpr(to(equalsBoundNode("LHS")), in registerMatchers() 54 callExpr(hasAnyArgument(expr(hasDescendant(declRefExpr( in registerMatchers() 65 hasArgument(0, declRefExpr(to(decl().bind("LHS")))), in registerMatchers()
|
| /llvm-project-15.0.7/clang/unittests/AST/ |
| H A D | DataCollectionTest.cpp | 107 ASSERT_TRUE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;", in TEST() 109 ASSERT_FALSE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;", in TEST() 111 ASSERT_FALSE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;", in TEST()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | DeleteNullPointerCheck.cpp | 24 has(declRefExpr(to(decl(equalsBoundNode("deletedPointer")))))) in registerMatchers() 33 declRefExpr(to(decl().bind("deletedPointer"))), in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/ |
| H A D | IdDependentBackwardBranchCheck.cpp | 26 stmt(anyOf(declRefExpr(to(varDecl())).bind("assign_ref_var"), in registerMatchers() 39 declRefExpr(to(varDecl().bind("tid_dep_var"))), in registerMatchers() 58 declRefExpr(to(varDecl().bind("pot_tid_var"))), in registerMatchers() 71 hasDescendant(stmt(anyOf(declRefExpr(to(varDecl())), in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | UseUncaughtExceptionsCheck.cpp | 31 declRefExpr(to(functionDecl(hasName(MatchText))), unless(callExpr())) in registerMatchers() 36 declRefExpr(hasDeclaration(functionDecl(hasName(MatchText))))))); in registerMatchers()
|
| H A D | UseEqualsDefaultCheck.cpp | 54 memberExpr(hasObjectExpression(declRefExpr(to(varDecl(equalsNode(Var))))), in accessToFieldInVar() 87 hasArgument(0, declRefExpr(to(varDecl( in isCopyConstructorAndCanBeDefaulted() 170 hasArgument(0, declRefExpr(to(varDecl( in isCopyAssignmentAndCanBeDefaulted()
|
| H A D | LoopConvertCheck.cpp | 73 declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))))); in integerComparisonMatcher() 83 return declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))); in incrementVarMatcher() 172 declRefExpr(to(varDecl(equalsBoundNode(EndVarName))))), in makeIteratorLoopMatcher() 178 declRefExpr(to(varDecl(equalsBoundNode(InitVarName)))))); in makeIteratorLoopMatcher() 208 hasUnaryOperand(declRefExpr( in makeIteratorLoopMatcher() 212 hasArgument(0, declRefExpr(to( in makeIteratorLoopMatcher() 283 declRefExpr(to(varDecl(equalsBoundNode(EndVarName))))), in makePseudoArrayLoopMatcher()
|
| /llvm-project-15.0.7/clang/unittests/Tooling/ |
| H A D | TransformerTest.cpp | 362 testRule(makeRule(declRefExpr(to(functionDecl(hasName("bad")))).bind(Ref), in TEST_F() 380 Transformer T(makeRule(declRefExpr(to(functionDecl())).bind(Ref), in TEST_F() 531 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F() 557 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F() 569 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F() 611 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F() 652 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F() 1273 hasLHS(ignoringImplicit(declRefExpr( in TEST_F() 1277 hasUnaryOperand(declRefExpr( in TEST_F() 1344 hasLHS(ignoringImplicit(declRefExpr(to( in TEST_F() [all …]
|
| H A D | SourceCodeBuildersTest.cpp | 149 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("ty")))); in TEST() 160 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("ty")))); in TEST() 171 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("ty")))); in TEST() 182 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("ty")))); in TEST()
|
| H A D | StencilTest.cpp | 510 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F() 520 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F() 530 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F() 540 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F() 550 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F() 560 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/hicpp/ |
| H A D | MultiwayPathsCoveredCheck.cpp | 34 ignoringImpCasts(declRefExpr().bind("non-enum-condition"))), in registerMatchers() 39 declRefExpr(hasType(enumType())).bind("enum-condition")))))) in registerMatchers()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | GCDAntipatternChecker.cpp | 60 return hasArgument(ArgIdx, ignoringParenCasts(declRefExpr( in equalsBoundArgDecl() 66 declRefExpr(to(varDecl().bind(DeclName))))); in bindAssignmentToDecl()
|