Home
last modified time | relevance | path

Searched refs:declRefExpr (Results 1 – 25 of 84) sorted by relevance

1234

/llvm-project-15.0.7/clang/unittests/ASTMatchers/
H A DASTMatchersTraversalTest.cpp841 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 DASTMatchersNarrowingTest.cpp65 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 DInefficientStringConcatenationCheck.cpp37 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 DInefficientVectorOperationCheck.cpp107 onImplicitObjectArgument(declRefExpr(to(TargetVarDecl)))) in addMatcher()
114 declRefExpr(to(varDecl(equalsBoundNode(LoopInitVarName))))); in addMatcher()
153 anyOf(declRefExpr(supportedContainerTypesMatcher()), in addMatcher()
H A DInefficientAlgorithmCheck.cpp44 on(declRefExpr( in registerMatchers()
52 on(declRefExpr(hasDeclaration( in registerMatchers()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSpuriouslyWakeUpFunctionsCheck.cpp21 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 DRedundantBranchConditionCheck.cpp52 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 DBoolPointerImplicitConversionCheck.cpp28 ignoringParenImpCasts(anyOf(declRefExpr().bind("expr"), in registerMatchers()
81 ignoringParenImpCasts(anyOf(declRefExpr(to(equalsNode(D))), in check()
H A DNotNullTerminatedResultCheck.cpp525 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 DMisplacedOperatorInStrlenInAllocCheck.cpp51 declRefExpr(hasDeclaration(Alloc0Func))))); in registerMatchers()
55 declRefExpr(hasDeclaration(Alloc1Func))))); in registerMatchers()
H A DUseAfterMoveCheck.cpp101 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 DLoopUnrolling.cpp89 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 DDeclRefExprUtils.cpp48 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 DStrCatAppendCheck.cpp50 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 DDataCollectionTest.cpp107 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 DDeleteNullPointerCheck.cpp24 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 DIdDependentBackwardBranchCheck.cpp26 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 DUseUncaughtExceptionsCheck.cpp31 declRefExpr(to(functionDecl(hasName(MatchText))), unless(callExpr())) in registerMatchers()
36 declRefExpr(hasDeclaration(functionDecl(hasName(MatchText))))))); in registerMatchers()
H A DUseEqualsDefaultCheck.cpp54 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 DLoopConvertCheck.cpp73 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 DTransformerTest.cpp362 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 DSourceCodeBuildersTest.cpp149 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 DStencilTest.cpp510 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 DMultiwayPathsCoveredCheck.cpp34 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 DGCDAntipatternChecker.cpp60 return hasArgument(ArgIdx, ignoringParenCasts(declRefExpr( in equalsBoundArgDecl()
66 declRefExpr(to(varDecl().bind(DeclName))))); in bindAssignmentToDecl()

1234