Lines Matching refs:DeclRefExpr

57 static std::string getDREAncestorString(const DeclRefExpr *DRE,  in getDREAncestorString()
368 if (auto *DRE0 = dyn_cast<DeclRefExpr>(E0)) in AST_MATCHER()
369 if (auto *DRE1 = dyn_cast<DeclRefExpr>(E1)) { in AST_MATCHER()
424 dyn_cast<DeclRefExpr>(Node.getBase()->IgnoreParenImpCasts()); in AST_MATCHER()
451 using DeclUseList = SmallVector<const DeclRefExpr *, 1>;
589 SmallVector<const DeclRefExpr *, 2> Uses; in getClaimedVarUseSites()
591 dyn_cast<DeclRefExpr>(Op->getSubExpr()->IgnoreParenImpCasts())) { in getClaimedVarUseSites()
630 dyn_cast<DeclRefExpr>(Op->getSubExpr()->IgnoreParenImpCasts())) { in getClaimedVarUseSites()
676 dyn_cast<DeclRefExpr>(ASE->getBase()->IgnoreParenImpCasts())) { in getClaimedVarUseSites()
728 if (const auto *DRE = dyn_cast<DeclRefExpr>(Ptr->IgnoreParenImpCasts())) { in getClaimedVarUseSites()
773 if (auto *DRE = dyn_cast<DeclRefExpr>(Ctor->getArg(0))) { in getClaimedVarUseSites()
790 const DeclRefExpr *PtrInitRHS; // the RHS pointer expression in `PI`
796 PtrInitRHS(Result.Nodes.getNodeAs<DeclRefExpr>(PointerInitRHSTag)) {} in PointerInitGadget()
837 const DeclRefExpr *PtrLHS; // the LHS pointer expression in `PA`
838 const DeclRefExpr *PtrRHS; // the RHS pointer expression in `PA`
843 PtrLHS(Result.Nodes.getNodeAs<DeclRefExpr>(PointerAssignLHSTag)), in PtrToPtrAssignmentGadget()
844 PtrRHS(Result.Nodes.getNodeAs<DeclRefExpr>(PointerAssignRHSTag)) {} in PtrToPtrAssignmentGadget()
886 const DeclRefExpr *PtrLHS; // the LHS pointer expression in `PA`
887 const DeclRefExpr *PtrRHS; // the RHS pointer expression in `PA`
892 PtrLHS(Result.Nodes.getNodeAs<DeclRefExpr>(PointerAssignLHSTag)), in CArrayToPtrAssignmentGadget()
893 PtrRHS(Result.Nodes.getNodeAs<DeclRefExpr>(PointerAssignRHSTag)) {} in CArrayToPtrAssignmentGadget()
1064 dyn_cast<DeclRefExpr>(Node->getBase()->IgnoreImpCasts())) { in getClaimedVarUseSites()
1077 const DeclRefExpr *Node;
1082 Node(Result.Nodes.getNodeAs<DeclRefExpr>(DeclRefExprTag)) { in UPCStandalonePointerGadget()
1109 const DeclRefExpr *BaseDeclRefExpr = nullptr;
1116 Result.Nodes.getNodeAs<DeclRefExpr>(BaseDeclRefExprTag)), in PointerDereferenceGadget()
1180 cast<DeclRefExpr>(ArraySubst->getBase()->IgnoreParenImpCasts()); in getClaimedVarUseSites()
1191 using UseSetTy = SmallSet<const DeclRefExpr *, 16>;
1206 void discoverUse(const DeclRefExpr *DRE) { Uses->insert(DRE); } in discoverUse()
1209 void claimUse(const DeclRefExpr *DRE) { in claimUse()
1218 return any_of(*Uses, [VD](const DeclRefExpr *DRE) { in hasUnclaimedUses()
1287 return {dyn_cast<DeclRefExpr>(Node->getSubExpr())}; in getClaimedVarUseSites()
1332 return {dyn_cast<DeclRefExpr>(Node->getLHS())}; in getClaimedVarUseSites()
1344 const DeclRefExpr *BaseDeclRefExpr = nullptr;
1353 Result.Nodes.getNodeAs<DeclRefExpr>(BaseDeclRefExprTag)), in DerefSimplePtrArithFixableGadget()
1408 if (const auto *DRE = Result.Nodes.getNodeAs<DeclRefExpr>("any_dre")) { in findGadgets()
1518 for (const DeclRefExpr *DRE : ClaimedVarUseSites) { in groupWarningGadgetsByVar()
1547 for (const DeclRefExpr *DRE : DREs) { in groupFixablesByVar()
1609 const DeclRefExpr *DRE);
1676 dyn_cast<DeclRefExpr>(Node->getBase()->IgnoreImpCasts())) in getFixits()
2052 const DeclRefExpr *DRE) { in createDataFixit()
2091 const auto *DRE = cast<DeclRefExpr>(ArraySub->getBase()->IgnoreImpCasts()); in fixUPCAddressofArraySubscriptWithSpan()
2269 isa_and_present<DeclRefExpr>(AddrOfExpr->getSubExpr())) in FixVarInitializerWithSpan()
3156 for (const clang::DeclRefExpr *UnclaimedDRE : UnclaimedDREs) { in checkUnsafeBufferUsage()