Home
last modified time | relevance | path

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

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/
H A 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()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DUseAfterMoveCheck.cpp51 const DeclRefExpr *DeclRef; member
187 TheUseAfterMove->DeclRef = Use; in findInternal()
226 for (const DeclRefExpr *DeclRef : DeclRefs) { in getUsesAndReinits() local
227 if (!ReinitDeclRefs.count(DeclRef)) in getUsesAndReinits()
228 Uses->push_back(DeclRef); in getUsesAndReinits()
269 const auto *DeclRef = Match.getNodeAs<DeclRefExpr>("declref"); in getDeclRefs() local
271 if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) { in getDeclRefs()
274 if (Operator || !isStandardSmartPointer(DeclRef->getDecl())) { in getDeclRefs()
275 DeclRefs->insert(DeclRef); in getDeclRefs()
384 SourceLocation UseLoc = Use.DeclRef->getExprLoc(); in emitDiagnostic()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DDeclRefExprUtils.cpp121 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyConstructorArgument() argument
124 declRefExpr(equalsNode(&DeclRef)), in isCopyConstructorArgument()
135 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyAssignmentArgument() argument
138 declRefExpr(equalsNode(&DeclRef)), in isCopyAssignmentArgument()
H A DDeclRefExprUtils.h46 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
51 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
H A 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()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A 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()
H A DUseAnyOfAllOfCheck.cpp82 return llvm::none_of(Matches, [&Mutations](auto &DeclRef) { in isViableLoop() argument
85 DeclRef.template getNodeAs<DeclRefExpr>("decl_ref")->getDecl()); in isViableLoop()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DThrowByValueCatchByReferenceCheck.cpp82 auto *DeclRef = dyn_cast<DeclRefExpr>(Inner); in diagnoseThrowLocations() local
83 if (DeclRef && isCatchVariable(DeclRef)) { in diagnoseThrowLocations()
H A DUnusedParametersCheck.cpp93 bool WalkUpFromDeclRefExpr(DeclRefExpr *DeclRef) { in WalkUpFromDeclRefExpr() argument
94 if (const auto *Fn = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in WalkUpFromDeclRefExpr()
96 Index[Fn].OtherRefs.insert(DeclRef); in WalkUpFromDeclRefExpr()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DPropertiesBase.td88 SubclassPropertyType<"CXXRecordDecl", DeclRef>;
90 SubclassPropertyType<"FunctionDecl", DeclRef>;
92 SubclassPropertyType<"NamedDecl", DeclRef>;
94 SubclassPropertyType<"NamespaceDecl", DeclRef>;
102 SubclassPropertyType<"TagDecl", DeclRef>;
104 SubclassPropertyType<"TemplateDecl", DeclRef>;
106 SubclassPropertyType<"ConceptDecl", DeclRef>;
112 SubclassPropertyType<"UsingShadowDecl", DeclRef>;
114 SubclassPropertyType<"ValueDecl", DeclRef>;
404 def : Property<"fieldDecl", DeclRef> {
[all …]
H A DTypeProperties.td356 def : Property<"declaration", DeclRef> {
379 def : Property<"declaration", DeclRef> {
499 def : Property<"declaration", DeclRef> {
553 def : Property<"declaration", DeclRef> {
863 def : Property<"declaration", DeclRef> {
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DExtractVariable.cpp76 bool VisitDeclRefExpr(DeclRefExpr *DeclRef) { // NOLINT in computeReferencedDecls() argument
77 ReferencedDecls.push_back(DeclRef->getDecl()); in computeReferencedDecls()
354 const SelectionTree::Node *getCallExpr(const SelectionTree::Node *DeclRef) { in getCallExpr() argument
355 const SelectionTree::Node &MaybeCallee = DeclRef->outerImplicit(); in getCallExpr()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/
H A DUnnecessaryValueParamCheck.cpp42 bool hasLoopStmtAncestor(const DeclRefExpr &DeclRef, const Decl &Decl, in hasLoopStmtAncestor() argument
47 equalsNode(&DeclRef), in hasLoopStmtAncestor()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A 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()
H A DAvoidBindCheck.cpp186 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Statement)) { in anyDescendantIsLocal() local
187 const ValueDecl *Decl = DeclRef->getDecl(); in anyDescendantIsLocal()
/llvm-project-15.0.7/clang-tools-extra/include-cleaner/unittests/
H A DWalkASTTest.cpp80 TEST(WalkAST, DeclRef) { in TEST() argument
/llvm-project-15.0.7/clang/lib/Analysis/
H A 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()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaCoroutine.cpp1176 if (auto *DeclRef = dyn_cast_or_null<DeclRefExpr>(E)) { in diagReturnOnAllocFailure() local
1177 auto *Decl = DeclRef->getDecl(); in diagReturnOnAllocFailure()
H A DSemaStmt.cpp1360 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(PrevCase)) { in ActOnFinishSwitchStmt() local
1361 PrevString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
1363 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(CurrCase)) { in ActOnFinishSwitchStmt() local
1364 CurrString = DeclRef->getDecl()->getName(); in ActOnFinishSwitchStmt()
H A DSema.cpp2459 if (const DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E.IgnoreParens())) { in tryExprAsCall() local
2460 if (const FunctionDecl *Fun = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in tryExprAsCall()
H A DSemaExpr.cpp4326 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E->IgnoreParens())) { in CheckUnaryExprOrTypeTraitOperand() local
4327 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) { in CheckUnaryExprOrTypeTraitOperand()
6858 ExprResult DeclRef = in BuildBuiltinCallExpr() local
6860 assert(DeclRef.isUsable() && "Builtin reference cannot fail"); in BuildBuiltinCallExpr()
6863 BuildCallExpr(/*Scope=*/nullptr, DeclRef.get(), Loc, CallArgs, Loc); in BuildBuiltinCallExpr()
17461 const DeclRefExpr *DeclRef = CheckPossibleDeref(*this, E); in WarnOnPendingNoDerefs() local
17462 if (DeclRef) { in WarnOnPendingNoDerefs()
17463 const ValueDecl *Decl = DeclRef->getDecl(); in WarnOnPendingNoDerefs()
17505 if (auto *DeclRef = in CheckForImmediateInvocation() local
17507 ExprEvalContexts.back().ReferenceToConsteval.erase(DeclRef); in CheckForImmediateInvocation()
/llvm-project-15.0.7/clang/lib/AST/
H A DExpr.cpp3962 if (DeclRefExpr *DeclRef = dyn_cast<DeclRefExpr>(E)) { in getSourceBitField() local
3963 if (FieldDecl *Field = dyn_cast<FieldDecl>(DeclRef->getDecl())) in getSourceBitField()
3967 if (BindingDecl *BD = dyn_cast<BindingDecl>(DeclRef->getDecl())) in getSourceBitField()