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

Declarations

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 1799     declRefExpr;

References

tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  198   REGISTER_MATCHER(declRefExpr);
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp
  142       match(findAll(declRefExpr(to(equalsNode(Dec))).bind(NodeID<Expr>::value)),
tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp
   62   return hasArgument(ArgIdx, ignoringParenCasts(declRefExpr(
   68                          declRefExpr(to(varDecl().bind(DeclName)))));
tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
  159       declRefExpr(to(parmVarDecl(DoublePointerParamM))).bind(CapturedBind);
tools/clang/lib/StaticAnalyzer/Checkers/PointerIterationChecker.cpp
   68   auto UnorderedContainerM = declRefExpr(to(varDecl(hasType(
tools/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
   86                         hasEitherOperand(ignoringParenImpCasts(declRefExpr(
   98                         declRefExpr(to(varDecl(VarNodeMatcher)))))),
  101                          declRefExpr(to(varDecl(VarNodeMatcher)))))));
  107       declRefExpr(to(varDecl(VarNodeMatcher))),
  116                 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))),
  117                 declRefExpr(to(varDecl(VarNodeMatcher)))))))));
  124       hasUnaryOperand(declRefExpr(hasDeclaration(VarNodeMatcher))));
  148                        binaryOperator(hasLHS(declRefExpr(to(varDecl(
  156                  hasUnaryOperand(declRefExpr(
tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
 1092         StatementMatcher RefToStatic = stmt(hasDescendant(declRefExpr(
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  510                                 declRefExpr(to(FuncMatcher.bind("func_decl")))
  517   Finder->addMatcher(declRefExpr(IsInMovedNs, hasAncestor(decl().bind("dc")),
  528       declRefExpr(IsInMovedNs, hasAncestor(decl().bind("dc")),
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
  207       declRefExpr(isExpansionInMainFile(), to(Decls.bind("use"))), this);
  210       declRefExpr(isExpansionInMainFile(),
tools/clang/tools/extra/clang-move/Move.cpp
  600       declRefExpr(to(HelperFuncOrVar), hasAncestor(decl().bind("dc")))
tools/clang/tools/extra/clang-tidy/abseil/StrCatAppendCheck.cpp
   52       hasArgument(0, ignoringImpCasts(declRefExpr(to(equalsBoundNode("LHS")),
   56       callExpr(hasAnyArgument(expr(hasDescendant(declRefExpr(
   65           hasArgument(0, declRefExpr(to(decl().bind("LHS")))),
tools/clang/tools/extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.cpp
   25                           ignoringParenImpCasts(declRefExpr().bind("expr")))),
   47   auto DeclRef = ignoringParenImpCasts(declRefExpr(to(equalsNode(D))));
tools/clang/tools/extra/clang-tidy/bugprone/DanglingHandleCheck.cpp
  151                          declRefExpr(to(varDecl(
tools/clang/tools/extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
   54                   declRefExpr(hasDeclaration(Alloc0Func)))));
   58                   declRefExpr(hasDeclaration(Alloc1Func)))));
tools/clang/tools/extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp
   89                hasArgument(0, ignoringParenImpCasts(declRefExpr(
tools/clang/tools/extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
  524       declRefExpr(to(varDecl(hasInitializer(ignoringImpCasts(InnerMatcher))))));
  530   auto DREHasDefinition = ignoringImpCasts(declRefExpr(
  533                 hasLHS(declRefExpr(to(varDecl(equalsBoundNode(VarDeclName))))),
  555   auto Container = ignoringImpCasts(cxxMemberCallExpr(hasDescendant(declRefExpr(
  598       ignoringImpCasts(declRefExpr(to(varDecl(hasInitializer(WrongLength)))));
  608       declRefExpr(to(varDecl(hasInitializer(CallExprReturnWithoutInc)))));
  638   auto DestArrayTyDecl = declRefExpr(
  644       declRefExpr(allOf(to(varDecl(AnyOfCharTy).bind(DestVarDeclName)),
  655       hasLHS(anyOf(hasDescendant(declRefExpr(
  657                    hasDescendant(declRefExpr(equalsBoundNode(DestExprName))))),
  661   auto SrcDecl = declRefExpr(
tools/clang/tools/extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp
  129                               ignoringParenImpCasts(declRefExpr(
tools/clang/tools/extra/clang-tidy/bugprone/StringConstructorCheck.cpp
   60       BoundStringLiteral, declRefExpr(hasDeclaration(anyOf(
tools/clang/tools/extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp
   57           ignoringParenImpCasts(declRefExpr(to(varDecl(hasType(isInteger()))))))
tools/clang/tools/extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp
   66             hasDescendant(cxxUnresolvedConstructExpr(hasDescendant(declRefExpr(
tools/clang/tools/extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
   79                hasAncestor(declRefExpr(
  252     auto DeclRefMatcher = declRefExpr(hasDeclaration(equalsNode(MovedVariable)),
  272       declRefExpr(hasDeclaration(equalsNode(MovedVariable))).bind("declref");
  382                hasArgument(0, declRefExpr().bind("arg")),
tools/clang/tools/extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp
   51           has(memberExpr(has(declRefExpr(RandomGeneratorEngineTypeMatcher)),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp
   27   const auto ReferencesUndefinedGlobalVar = declRefExpr(hasDeclaration(
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
   77               declRefExpr(unless(ConsideredOwner)).bind("deleted_variable")))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
   33           unless(hasLHS(ignoringImpCasts(declRefExpr(to(isImplicit()))))))
tools/clang/tools/extra/clang-tidy/google/ExplicitMakePairCheck.cpp
   39                    declRefExpr(hasExplicitTemplateArgs(),
tools/clang/tools/extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
  178                                 declRefExpr(to(Methods)).bind("ref")),
tools/clang/tools/extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
   34                     ignoringImpCasts(declRefExpr().bind("non-enum-condition"))),
   39                   declRefExpr(hasType(enumType())).bind("enum-condition"))))))
tools/clang/tools/extra/clang-tidy/hicpp/SignedBitwiseCheck.cpp
   32   const auto IsStdBitmask = ignoringImpCasts(declRefExpr(hasType(BitmaskType)));
tools/clang/tools/extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp
   53                       hasArgument(0, anyOf(declRefExpr().bind("arg"),
tools/clang/tools/extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
   59   Finder->addMatcher(declRefExpr().bind("used"), this);
tools/clang/tools/extra/clang-tidy/modernize/AvoidBindCheck.cpp
  126           hasArgument(0, declRefExpr(to(functionDecl().bind("f"))).bind("ref")))
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp
   51       declRefExpr(to(varDecl(hasType(isInteger())).bind(ConditionVarName)))));
   61   return declRefExpr(to(varDecl(hasType(isInteger())).bind(IncrementVarName)));
  150                      declRefExpr(to(varDecl().bind(ConditionEndVarName)))),
  156       ignoringParenImpCasts(declRefExpr(to(varDecl().bind(ConditionVarName)))));
  196                                hasUnaryOperand(declRefExpr(
  202                          0, declRefExpr(to(varDecl(TestDerefReturnsByValue)
  277       expr(anyOf(ignoringParenImpCasts(declRefExpr(to(
tools/clang/tools/extra/clang-tidy/modernize/PassByValueCheck.cpp
  148                       has(ignoringParenImpCasts(declRefExpr(to(
tools/clang/tools/extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
   40                has(implicitCastExpr(has(declRefExpr().bind("name")))))
tools/clang/tools/extra/clang-tidy/modernize/ShrinkToFitCheck.cpp
   30       declRefExpr(hasDeclaration(valueDecl().bind("ContainerDecl")));
   37                  declRefExpr(hasDeclaration(equalsBoundNode("ContainerDecl"))),
   40                  unaryOperator(has(ignoringParenImpCasts(declRefExpr(
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp
  287             has(ignoringImpCasts(declRefExpr(hasExplicitTemplateArgs()))));
tools/clang/tools/extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
  204             declRefExpr(to(enumConstantDecl())));
tools/clang/tools/extra/clang-tidy/modernize/UseEmplaceCheck.cpp
   98           callee(expr(ignoringImplicit(declRefExpr(
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
   53       memberExpr(hasObjectExpression(declRefExpr(to(varDecl(equalsNode(Var))))),
   84                         0, declRefExpr(to(varDecl(equalsNode(Param)))))))))),
  160                 hasArgument(0, declRefExpr(to(varDecl(equalsNode(Param))))))))),
tools/clang/tools/extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp
   33       declRefExpr(to(functionDecl(hasName(MatchText))), unless(callExpr()))
tools/clang/tools/extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
   49                      on(declRefExpr(
   58                      on(declRefExpr(
tools/clang/tools/extra/clang-tidy/performance/InefficientStringConcatenationCheck.cpp
   40       hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))));
   45           hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))),
   51       hasArgument(0, declRefExpr(BasicStringType,
   54       hasArgument(1, stmt(hasDescendant(declRefExpr(
tools/clang/tools/extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
  103           onImplicitObjectArgument(declRefExpr(to(TargetVarDecl))))
  110       declRefExpr(to(varDecl(equalsBoundNode(LoopInitVarName)))));
  148           hasRangeInit(declRefExpr(supportedContainerTypesMatcher())),
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
   50                         on(declRefExpr(to(varDecl().bind("objectArg")))));
   82   Finder->addMatcher(localVarCopiedFrom(declRefExpr(
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
   36   auto Matches = match(declRefExpr(to(functionDecl(equalsNode(&Function))),
   45       match(decl(forEachDescendant(declRefExpr(
tools/clang/tools/extra/clang-tidy/readability/DeleteNullPointerCheck.cpp
   23       cxxDeleteExpr(has(castExpr(has(declRefExpr(
   33       declRefExpr(to(decl().bind("deletedPointer"))),
tools/clang/tools/extra/clang-tidy/readability/IdentifierNamingCheck.cpp
  239   Finder->addMatcher(declRefExpr().bind("declRef"), this);
tools/clang/tools/extra/clang-tidy/readability/NonConstParameterCheck.cpp
   28   Finder->addMatcher(declRefExpr().bind("Ref"), this);
tools/clang/tools/extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
  462   auto VarAssign = declRefExpr(hasDeclaration(decl().bind(IfAssignVarId)));
  463   auto VarRef = declRefExpr(hasDeclaration(equalsBoundNode(IfAssignVarId)));
tools/clang/tools/extra/clang-tidy/utils/DeclRefExprUtils.cpp
   48       declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef");
   79       declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef");
  122       findAll(declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef")),
  133           declRefExpr(to(varDecl(equalsNode(&VarDecl)))).bind("declRef"))),
  143       declRefExpr(equalsNode(&DeclRef)),
  157       declRefExpr(equalsNode(&DeclRef)),
tools/clang/tools/extra/clang-tidy/utils/UsingInserter.cpp
   65       !match(findAll(declRefExpr(to(ConflictingDecl))), *Function, Context)
tools/clang/unittests/AST/ASTImporterTest.cpp
  572                   declRefExpr(hasDeclaration(varDecl(hasName("ptr"))),
  815           hasDescendant(implicitCastExpr(has(declRefExpr()))),
  830           hasDescendant(declRefExpr(to(varTemplateSpecializationDecl()))),
  846           returnStmt(has(implicitCastExpr(has(declRefExpr())))))));
 1754   auto ToLHS = LastDeclMatcher<DeclRefExpr>().match(ToD, declRefExpr());
 1755   auto FromLHS = LastDeclMatcher<DeclRefExpr>().match(FromTU, declRefExpr());
 2389       ToD, functionDecl(hasName("f"), hasDescendant(declRefExpr()))));
 2417                 functionDecl(hasName("f"), hasDescendant(declRefExpr()))))));
tools/clang/unittests/AST/DataCollectionTest.cpp
  107   ASSERT_TRUE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;",
  109   ASSERT_FALSE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;",
  111   ASSERT_FALSE(isStmtHashEqual(declRefExpr().bind("id"), "int x, r = x;",
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
   29                      hasArgument(0, declRefExpr(to(varDecl())))))));
   32                      hasArgument(0, declRefExpr(to(varDecl()))),
   37                      hasArgument(0, declRefExpr(to(varDecl()))),
   43                      hasArgument(0, declRefExpr(to(varDecl()))),
  866     callExpr(hasArgument(0, declRefExpr(
  873                          callExpr(hasArgument(0, declRefExpr(
 1212     hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
 1228     hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
 1729                           declRefExpr(to(namedDecl(hasName("t"))))))));
 1733                   declRefExpr(to(namedDecl(hasName("t"))))))));
 1746                           declRefExpr(to(namedDecl(hasName("t"))))))));
 2352       forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d")))))),
 2364       on(declRefExpr(to(
 2368         on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))
 2380       on(declRefExpr(to(
 2384         on(declRefExpr(to(varDecl(equalsBoundNode("var")))))))))))
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
  400     declRefExpr(to(
  426     cxxMemberCallExpr(on(declRefExpr(to(varDecl(hasName("y"))))));
  550                                     hasDescendant(declRefExpr(to(
 1086                       declRefExpr(to(functionDecl(hasName("f"))))));
 1234     variableArrayType(hasSizeExpr(ignoringImpCasts(declRefExpr(to(
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
  125            has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i")))))));
  136          hasDescendant(declRefExpr(to(varDecl(hasName("i"))))));
  392     hasArgument(0, declRefExpr(to(varDecl(hasName("y"))))));
  400     hasArgument(42, declRefExpr(to(varDecl(hasName("y"))))));
  406       ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("y"))))));
  449       objcMessageExpr(hasReceiver(declRefExpr(to(varDecl(hasName("x"))))))));
  454       objcMessageExpr(hasReceiver(declRefExpr(to(varDecl(hasName("x"))))))));
  620     declRefExpr(to(varDecl(hasName("y")))).bind("arg");
  633     declRefExpr(to(varDecl(hasName("y")))).bind("arg");
  662     declRefExpr(to(varDecl(hasName("y")))).bind("arg");
  686     declRefExpr(to(varDecl(hasName("y")))).bind("arg");
  714         declRefExpr(to(decl(equalsBoundNode("v")))), parmVarDecl())))),
  838       hasDescendant(declRefExpr(to(fieldDecl(hasName("next"))))))))));
 1297       hasSourceExpression(declRefExpr()))))));
 1368     cxxForRangeStmt(hasRangeInit(declRefExpr(to(varDecl(hasName("a"))))))));
 1500   auto matcher = expr(ignoringElidableConstructorCall(declRefExpr()));
 1604                         declRefExpr(to(varDecl(hasName("x")))))))));
 1643                         declRefExpr(to(varDecl(hasName("x")))))))));
 1702                         declRefExpr(to(varDecl(hasName("x")))))))));
 1714                         declRefExpr(to(varDecl(hasName("x")))))))));
 1766     declRefExpr(throughUsingDecl(anything()))));
 1769     declRefExpr(throughUsingDecl(anything()))));
 2213                       declRefExpr(to(decl(hasAncestor(decl()))))));
 2235                       declRefExpr(to(decl(hasAncestor(decl()))))));
 2245                       declRefExpr(to(decl(hasAncestor(decl()))))));
 2252                       declRefExpr(to(decl(hasAncestor(decl()))))));
tools/clang/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
  182               VariantValue(VariantMatcher::SingleMatcher(declRefExpr()))
tools/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
   47   return declRefExpr(to(namedDecl(hasName(Name))));
tools/clang/unittests/Tooling/RangeSelectorTest.cpp
  297   TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref));
  332   TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref));
tools/clang/unittests/Tooling/RefactoringCallbacksTest.cpp
   83                              declRefExpr(to(varDecl(hasName("a"))))))))
tools/clang/unittests/Tooling/TransformerTest.cpp
  260   testRule(makeRule(declRefExpr(to(functionDecl(hasName("bad")))).bind(Ref),
  278   Transformer T(makeRule(declRefExpr(to(functionDecl())).bind(Ref),