Home
last modified time | relevance | path

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

/external/llvm-project/clang-tools-extra/clang-tidy/google/
DExplicitMakePairCheck.cpp43 const auto *DeclRef = Result.Nodes.getNodeAs<DeclRefExpr>("declref"); in check() local
59 SourceRange(DeclRef->getBeginLoc(), DeclRef->getLAngleLoc()), in check()
65 SourceRange(DeclRef->getLAngleLoc(), DeclRef->getRAngleLoc())); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DUseAfterMoveCheck.cpp50 const DeclRefExpr *DeclRef; member
179 TheUseAfterMove->DeclRef = Use; in findInternal()
218 for (const DeclRefExpr *DeclRef : DeclRefs) { in getUsesAndReinits() local
219 if (!ReinitDeclRefs.count(DeclRef)) in getUsesAndReinits()
220 Uses->push_back(DeclRef); in getUsesAndReinits()
262 const auto *DeclRef = Match.getNodeAs<DeclRefExpr>("declref"); in getDeclRefs() local
264 if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) { in getDeclRefs()
267 if (Operator || !isStandardSmartPointer(DeclRef->getDecl())) { in getDeclRefs()
268 DeclRefs->insert(DeclRef); in getDeclRefs()
380 SourceLocation UseLoc = Use.DeclRef->getExprLoc(); in emitDiagnostic()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DDeclRefExprUtils.cpp110 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyConstructorArgument() argument
113 declRefExpr(equalsNode(&DeclRef)), in isCopyConstructorArgument()
124 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyAssignmentArgument() argument
127 declRefExpr(equalsNode(&DeclRef)), in isCopyAssignmentArgument()
DDeclRefExprUtils.h46 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
51 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
DRenamerClangTidyCheck.cpp359 if (const auto *DeclRef = Result.Nodes.getNodeAs<DeclRefExpr>("declRef")) { in check() local
360 SourceRange Range = DeclRef->getNameInfo().getSourceRange(); in check()
361 addUsage(DeclRef->getDecl(), Range, Result.SourceManager); in check()
/external/llvm-project/clang/include/clang/AST/
DPropertiesBase.td83 def DeclRef : RefPropertyType<"Decl"> { let ConstWhenWriting = 1; }
85 SubclassPropertyType<"CXXRecordDecl", DeclRef>;
87 SubclassPropertyType<"FunctionDecl", DeclRef>;
89 SubclassPropertyType<"NamedDecl", DeclRef>;
91 SubclassPropertyType<"NamespaceDecl", DeclRef>;
93 SubclassPropertyType<"NamespaceAliasDecl", DeclRef>;
95 SubclassPropertyType<"ObjCProtocolDecl", DeclRef>;
97 SubclassPropertyType<"ObjCTypeParamDecl", DeclRef>;
99 SubclassPropertyType<"TagDecl", DeclRef>;
101 SubclassPropertyType<"TemplateDecl", DeclRef>;
[all …]
DTypeProperties.td356 def : Property<"declaration", DeclRef> {
366 def : Property<"declaration", DeclRef> {
486 def : Property<"declaration", DeclRef> {
536 def : Property<"declaration", DeclRef> {
829 def : Property<"declaration", DeclRef> {
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DElseAfterReturnCheck.cpp54 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Node)) { in findUsage() local
55 if (DeclRef->getDecl()->getID() == DeclIdentifier) in findUsage()
56 return DeclRef; in findUsage()
71 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Node)) { in findUsageRange() local
72 if (llvm::is_contained(DeclIdentifiers, DeclRef->getDecl()->getID())) in findUsageRange()
73 return DeclRef; in findUsageRange()
DUseAnyOfAllOfCheck.cpp83 return llvm::none_of(Matches, [&Mutations](auto &DeclRef) { in isViableLoop() argument
86 DeclRef.template getNodeAs<DeclRefExpr>("decl_ref")->getDecl()); in isViableLoop()
/external/llvm-project/clang-tools-extra/clang-tidy/misc/
DUnusedParametersCheck.cpp92 bool WalkUpFromDeclRefExpr(DeclRefExpr *DeclRef) { in WalkUpFromDeclRefExpr() argument
93 if (const auto *Fn = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in WalkUpFromDeclRefExpr()
95 Index[Fn].OtherRefs.insert(DeclRef); in WalkUpFromDeclRefExpr()
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/
DExtractVariable.cpp76 bool VisitDeclRefExpr(DeclRefExpr *DeclRef) { // NOLINT in computeReferencedDecls() argument
77 ReferencedDecls.push_back(DeclRef->getDecl()); in computeReferencedDecls()
323 const SelectionTree::Node *getCallExpr(const SelectionTree::Node *DeclRef) { in getCallExpr() argument
324 const SelectionTree::Node &MaybeCallee = DeclRef->outerImplicit(); in getCallExpr()
/external/llvm-project/clang-tools-extra/clang-tidy/performance/
DUnnecessaryValueParamCheck.cpp42 bool hasLoopStmtAncestor(const DeclRefExpr &DeclRef, const Decl &Decl, in hasLoopStmtAncestor() argument
47 equalsNode(&DeclRef), in hasLoopStmtAncestor()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DLoopConvertUtils.cpp74 bool DependencyFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) { in VisitDeclRefExpr() argument
75 if (auto *V = dyn_cast_or_null<VarDecl>(DeclRef->getDecl())) in VisitDeclRefExpr()
127 bool DeclFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) { in VisitDeclRefExpr() argument
128 if (auto *D = dyn_cast<NamedDecl>(DeclRef->getDecl())) in VisitDeclRefExpr()
DAvoidBindCheck.cpp186 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Statement)) { in anyDescendantIsLocal() local
187 const ValueDecl *Decl = DeclRef->getDecl(); in anyDescendantIsLocal()
/external/llvm-project/clang/lib/Analysis/
DConsumed.cpp507 void VisitDeclRefExpr(const DeclRefExpr *DeclRef);
832 void ConsumedStmtVisitor::VisitDeclRefExpr(const DeclRefExpr *DeclRef) { in VisitDeclRefExpr() argument
833 if (const auto *Var = dyn_cast_or_null<VarDecl>(DeclRef->getDecl())) in VisitDeclRefExpr()
835 PropagationMap.insert(PairType(DeclRef, PropagationInfo(Var))); in VisitDeclRefExpr()
/external/llvm-project/clang/lib/Sema/
DSemaCoroutine.cpp303 ExprResult DeclRef = in buildBuiltinCall() local
305 assert(DeclRef.isUsable() && "Builtin reference cannot fail"); in buildBuiltinCall()
308 S.BuildCallExpr(/*Scope=*/nullptr, DeclRef.get(), Loc, CallArgs, Loc); in buildBuiltinCall()
1183 if (auto *DeclRef = dyn_cast_or_null<DeclRefExpr>(E)) { in diagReturnOnAllocFailure() local
1184 auto *Decl = DeclRef->getDecl(); in diagReturnOnAllocFailure()
DSemaStmt.cpp1043 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(PrevCase)) { in ActOnFinishSwitchStmt() local
1044 PrevString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
1046 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(CurrCase)) { in ActOnFinishSwitchStmt() local
1047 CurrString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
DSema.cpp2229 if (const DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E.IgnoreParens())) { in tryExprAsCall() local
2230 if (const FunctionDecl *Fun = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in tryExprAsCall()
DSemaExpr.cpp4147 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParens())) { in CheckUnaryExprOrTypeTraitOperand() local
4148 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) { in CheckUnaryExprOrTypeTraitOperand()
16288 const DeclRefExpr *DeclRef = CheckPossibleDeref(*this, E); in WarnOnPendingNoDerefs() local
16289 if (DeclRef) { in WarnOnPendingNoDerefs()
16290 const ValueDecl *Decl = DeclRef->getDecl(); in WarnOnPendingNoDerefs()
16332 if (auto *DeclRef = in CheckForImmediateInvocation() local
16334 ExprEvalContexts.back().ReferenceToConsteval.erase(DeclRef); in CheckForImmediateInvocation()
/external/clang/lib/Analysis/
DConsumed.cpp504 void VisitDeclRefExpr(const DeclRefExpr *DeclRef);
846 void ConsumedStmtVisitor::VisitDeclRefExpr(const DeclRefExpr *DeclRef) { in VisitDeclRefExpr() argument
847 if (const VarDecl *Var = dyn_cast_or_null<VarDecl>(DeclRef->getDecl())) in VisitDeclRefExpr()
849 PropagationMap.insert(PairType(DeclRef, PropagationInfo(Var))); in VisitDeclRefExpr()
/external/clang/lib/Sema/
DSema.cpp1361 if (const DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E.IgnoreParens())) { in tryExprAsCall() local
1362 if (const FunctionDecl *Fun = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in tryExprAsCall()
DSemaStmt.cpp913 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(PrevCase)) { in ActOnFinishSwitchStmt() local
914 PrevString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
916 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(CurrCase)) { in ActOnFinishSwitchStmt() local
917 CurrString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
DSemaExpr.cpp3670 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParens())) { in CheckUnaryExprOrTypeTraitOperand() local
3671 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) { in CheckUnaryExprOrTypeTraitOperand()
13345 Expr *DeclRef = new (S.Context) DeclRefExpr(Var, Nested, in captureInBlock() local
13353 Loc, DeclRef); in captureInBlock()
/external/llvm-project/clang/lib/AST/
DExpr.cpp3784 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E)) { in getSourceBitField() local
3785 if (FieldDecl *Field = dyn_cast<FieldDecl>(DeclRef->getDecl())) in getSourceBitField()
3789 if (BindingDecl *BD = dyn_cast<BindingDecl>(DeclRef->getDecl())) in getSourceBitField()
/external/clang/lib/AST/
DExpr.cpp3309 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E)) in getSourceBitField() local
3310 if (FieldDecl *Field = dyn_cast<FieldDecl>(DeclRef->getDecl())) in getSourceBitField()