Home
last modified time | relevance | path

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

1234

/external/llvm-project/clang-tools-extra/clang-tidy/misc/
DThrowByValueCatchByReferenceCheck.cpp50 const DeclRefExpr *declRefExpr) { in isFunctionParameter() argument
51 return isa<ParmVarDecl>(declRefExpr->getDecl()); in isFunctionParameter()
55 const DeclRefExpr *declRefExpr) { in isCatchVariable() argument
56 auto *valueDecl = declRefExpr->getDecl(); in isCatchVariable()
63 const DeclRefExpr *declRefExpr) { in isFunctionOrCatchVar() argument
64 return isFunctionParameter(declRefExpr) || isCatchVariable(declRefExpr); in isFunctionOrCatchVar()
DThrowByValueCatchByReferenceCheck.h43 bool isFunctionParameter(const DeclRefExpr *declRefExpr);
44 bool isCatchVariable(const DeclRefExpr *declRefExpr);
45 bool isFunctionOrCatchVar(const DeclRefExpr *declRefExpr);
/external/llvm-project/clang-tools-extra/clang-tidy/performance/
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()
DInefficientVectorOperationCheck.cpp103 onImplicitObjectArgument(declRefExpr(to(TargetVarDecl)))) in AddMatcher()
110 declRefExpr(to(varDecl(equalsBoundNode(LoopInitVarName))))); in AddMatcher()
148 hasRangeInit(declRefExpr(supportedContainerTypesMatcher())), in AddMatcher()
DInefficientAlgorithmCheck.cpp45 on(declRefExpr( in registerMatchers()
54 on(declRefExpr( in registerMatchers()
/external/llvm-project/clang/lib/StaticAnalyzer/Core/
DLoopUnrolling.cpp86 hasEitherOperand(ignoringParenImpCasts(declRefExpr( in simpleCondition()
98 declRefExpr(to(varDecl(VarNodeMatcher)))))), in changeIntBoundNode()
101 declRefExpr(to(varDecl(VarNodeMatcher))))))); in changeIntBoundNode()
107 declRefExpr(to(varDecl(VarNodeMatcher))), in callByRef()
116 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))), in assignedToRef()
117 declRefExpr(to(varDecl(VarNodeMatcher))))))))); in assignedToRef()
124 hasUnaryOperand(declRefExpr(hasDeclaration(VarNodeMatcher)))); in getAddrTo()
148 binaryOperator(hasLHS(declRefExpr(to(varDecl( in forLoopMatcher()
156 hasUnaryOperand(declRefExpr( in forLoopMatcher()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
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()
DRedundantBranchConditionCheck.cpp46 declRefExpr(hasDeclaration(ImmutableVar)), in registerMatchers()
48 hasEitherOperand(ignoringParenImpCasts(declRefExpr( in registerMatchers()
52 anyOf(declRefExpr(hasDeclaration( in registerMatchers()
57 declRefExpr(hasDeclaration(varDecl( in registerMatchers()
DBoolPointerImplicitConversionCheck.cpp28 ignoringParenImpCasts(anyOf(declRefExpr().bind("expr"), in registerMatchers()
81 ignoringParenImpCasts(anyOf(declRefExpr(to(equalsNode(D))), in check()
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 …]
DMisplacedOperatorInStrlenInAllocCheck.cpp51 declRefExpr(hasDeclaration(Alloc0Func))))); in registerMatchers()
55 declRefExpr(hasDeclaration(Alloc1Func))))); in registerMatchers()
DUseAfterMoveCheck.cpp100 hasAncestor(declRefExpr( in inDecltypeOrTemplateArg()
274 auto DeclRefMatcher = declRefExpr(hasDeclaration(equalsNode(MovedVariable)), in getDeclRefs()
294 declRefExpr(hasDeclaration(equalsNode(MovedVariable))).bind("declref"); in getReinits()
401 hasArgument(0, declRefExpr().bind("arg")), in registerMatchers()
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DDeclRefExprUtils.cpp48 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"); in constReferenceDeclRefExprs()
92 findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")), in allDeclRefExprs()
103 declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))), in allDeclRefExprs()
113 declRefExpr(equalsNode(&DeclRef)), in isCopyConstructorArgument()
127 declRefExpr(equalsNode(&DeclRef)), in isCopyAssignmentArgument()
/external/llvm-project/clang-tools-extra/clang-tidy/abseil/
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()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DShrinkToFitCheck.cpp27 declRefExpr(hasDeclaration(valueDecl().bind("ContainerDecl"))); in registerMatchers()
34 declRefExpr(hasDeclaration(equalsBoundNode("ContainerDecl"))), in registerMatchers()
37 unaryOperator(has(ignoringParenImpCasts(declRefExpr( in registerMatchers()
DUseUncaughtExceptionsCheck.cpp31 declRefExpr(to(functionDecl(hasName(MatchText))), unless(callExpr())) in registerMatchers()
36 declRefExpr(hasDeclaration(functionDecl(hasName(MatchText))))))); in registerMatchers()
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()
/external/llvm-project/clang/unittests/ASTMatchers/
DASTMatchersTraversalTest.cpp125 has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i"))))))); in TEST()
136 hasDescendant(declRefExpr(to(varDecl(hasName("i")))))); in TEST()
393 hasArgument(0, declRefExpr(to(varDecl(hasName("y")))))); in TEST()
401 hasArgument(42, declRefExpr(to(varDecl(hasName("y")))))); in TEST()
407 ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("y")))))); in TEST()
450 objcMessageExpr(hasReceiver(declRefExpr(to(varDecl(hasName("x")))))))); in TEST()
455 objcMessageExpr(hasReceiver(declRefExpr(to(varDecl(hasName("x")))))))); in TEST()
645 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
658 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
687 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
[all …]
DASTMatchersNarrowingTest.cpp65 EXPECT_TRUE(matches(input, declRefExpr(isExpandedFromMacro("MY_MACRO")))); in TEST_P()
167 hasArgument(0, declRefExpr(to(varDecl()))))))); 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()
1046 0, declRefExpr(to(varDecl(hasType(isInteger())))))))); in TEST_P()
1060 0, declRefExpr(to(varDecl(hasType(isInteger())))))))); in TEST_P()
1592 cxxConstructExpr(hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))))); in TEST_P()
1608 hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))))); in TEST_P()
1642 hasObjectExpression(declRefExpr(hasType(templateSpecializationType( in TEST()
[all …]
/external/clang/unittests/ASTMatchers/
DASTMatchersTraversalTest.cpp126 has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i"))))))); in TEST()
137 hasDescendant(declRefExpr(to(varDecl(hasName("i")))))); in TEST()
336 hasArgument(0, declRefExpr(to(varDecl(hasName("y")))))); in TEST()
344 hasArgument(42, declRefExpr(to(varDecl(hasName("y")))))); in TEST()
351 ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("y"))))))); in TEST()
363 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
376 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
405 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
429 declRefExpr(to(varDecl(hasName("y")))).bind("arg"); in TEST()
457 declRefExpr(to(decl(equalsBoundNode("v")))), parmVarDecl())))), in TEST()
[all …]
/external/llvm-project/clang/unittests/AST/
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()
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DDeleteNullPointerCheck.cpp23 cxxDeleteExpr(has(castExpr(has(declRefExpr( in registerMatchers()
33 declRefExpr(to(decl().bind("deletedPointer"))), in registerMatchers()
/external/llvm-project/clang/unittests/Tooling/
DTransformerTest.cpp324 testRule(makeRule(declRefExpr(to(functionDecl(hasName("bad")))).bind(Ref), in TEST_F()
342 Transformer T(makeRule(declRefExpr(to(functionDecl())).bind(Ref), in TEST_F()
493 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
519 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
531 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
560 auto InlineVar = makeRule(declRefExpr(to(varDecl(equalsBoundNode(VarId)))), in TEST_F()
573 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
614 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
631 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
670 makeRule(declRefExpr(to(varDecl(hasName("x")))), changeTo(cat("3"))); in TEST_F()
[all …]
DStencilTest.cpp374 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
384 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
394 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
404 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
414 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
424 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("type")))); in TEST_F()
/external/llvm-project/clang-tools-extra/clang-tidy/hicpp/
DMultiwayPathsCoveredCheck.cpp34 ignoringImpCasts(declRefExpr().bind("non-enum-condition"))), in registerMatchers()
39 declRefExpr(hasType(enumType())).bind("enum-condition")))))) in registerMatchers()

1234