Home
last modified time | relevance | path

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

12345678910>>...12

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A 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()
82 auto *DeclRef = dyn_cast<DeclRefExpr>(Inner); in diagnoseThrowLocations()
105 const auto *VariableReference = dyn_cast<DeclRefExpr>(CurrentSubExpr); in diagnoseThrowLocations()
122 if (auto *Tmp = dyn_cast<DeclRefExpr>(CurrentSubExpr)) in diagnoseThrowLocations()
H A DThrowByValueCatchByReferenceCheck.h43 bool isFunctionParameter(const DeclRefExpr *DeclRefExpr);
44 bool isCatchVariable(const DeclRefExpr *DeclRefExpr);
45 bool isFunctionOrCatchVar(const DeclRefExpr *DeclRefExpr);
/llvm-project-15.0.7/clang/test/Index/
H A Dannotate-subscripting.m39 // CHECK: Identifier: "array" [24:3 - 24:8] DeclRefExpr=array:23:19
52 // CHECK: Identifier: "p" [25:21 - 25:22] DeclRefExpr=p:22:28
54 // CHECK: Identifier: "p" [25:24 - 25:25] DeclRefExpr=p:22:28
58 // CHECK: Identifier: "array" [26:10 - 26:15] DeclRefExpr=array:23:19
60 // CHECK: Identifier: "index" [26:16 - 26:21] DeclRefExpr=index:22:18
64 // CHECK: Identifier: "oldObject" [33:3 - 33:12] DeclRefExpr=oldObject:32:17
68 // CHECK: Identifier: "key" [33:26 - 33:29] DeclRefExpr=key:31:13
73 // CHECK: Identifier: "key" [34:14 - 34:17] DeclRefExpr=key:31:13
76 // CHECK: Identifier: "newObject" [34:21 - 34:30] DeclRefExpr=newObject:32:6
84 // CHECK: Identifier: "key" [35:27 - 35:30] DeclRefExpr=key:31:13
[all …]
H A Dfile-refs-subscripting.m43 // CHECK-NEXT: DeclRefExpr=index:22:18 =[26:16 - 26:21]
48 // CHECK-NEXT: DeclRefExpr=p:22:28 =[25:21 - 25:22]
49 // CHECK-NEXT: DeclRefExpr=p:22:28 =[25:24 - 25:25]
52 // CHECK-NEXT: DeclRefExpr=key:31:13
54 // CHECK-NEXT: DeclRefExpr=key:31:13 =[33:26 - 33:29]
55 // CHECK-NEXT: DeclRefExpr=key:31:13 =[34:14 - 34:17]
56 // CHECK-NEXT: DeclRefExpr=key:31:13 =[35:27 - 35:30]
57 // CHECK-NEXT: DeclRefExpr=key:31:13 =[35:43 - 35:46]
60 // CHECK-NEXT: DeclRefExpr=newObject:32:6
62 // CHECK-NEXT: DeclRefExpr=newObject:32:6 =[34:21 - 34:30]
[all …]
H A Dindex-subscripting-literals.m44 …ference]: kind: variable | name: idx | USR: c:@idx | lang: C | cursor: DeclRefExpr=idx:22:5 | loc:…
49 …tyReference]: kind: variable | name: p | USR: c:@p | lang: C | cursor: DeclRefExpr=p:23:4 | loc: 2…
50 …tyReference]: kind: variable | name: p | USR: c:@p | lang: C | cursor: DeclRefExpr=p:23:4 | loc: 2…
51 …ference]: kind: variable | name: idx | USR: c:@idx | lang: C | cursor: DeclRefExpr=idx:22:5 | loc:…
56 …ference]: kind: variable | name: key | USR: c:@key | lang: C | cursor: DeclRefExpr=key:32:11 | loc…
58 …ference]: kind: variable | name: key | USR: c:@key | lang: C | cursor: DeclRefExpr=key:32:11 | loc…
59 …nd: variable | name: newObject | USR: c:@newObject | lang: C | cursor: DeclRefExpr=newObject:33:4 …
63 …ference]: kind: variable | name: key | USR: c:@key | lang: C | cursor: DeclRefExpr=key:32:11 | loc…
64 …nd: variable | name: newObject | USR: c:@newObject | lang: C | cursor: DeclRefExpr=newObject:33:4 …
65 …ference]: kind: variable | name: key | USR: c:@key | lang: C | cursor: DeclRefExpr=key:32:11 | loc…
[all …]
H A Dannotate-literals.m56 // CHECK-LITERALS: Identifier: "o1" [41:19 - 41:21] DeclRefExpr=o1:40:30
58 // CHECK-LITERALS: Identifier: "o2" [41:23 - 41:25] DeclRefExpr=o2:40:44
66 // CHECK-LITERALS: Identifier: "k1" [42:16 - 42:18] DeclRefExpr=k1:40:23
68 // CHECK-LITERALS: Identifier: "o1" [42:21 - 42:23] DeclRefExpr=o1:40:30
70 // CHECK-LITERALS: Identifier: "k2" [43:16 - 43:18] DeclRefExpr=k2:40:37
72 // CHECK-LITERALS: Identifier: "o2" [43:21 - 43:23] DeclRefExpr=o2:40:44
74 // CHECK-LITERALS: Identifier: "k3" [44:16 - 44:18] DeclRefExpr=k3:40:51
85 // CHECK-LITERALS: Identifier: "s" [45:14 - 45:15] DeclRefExpr=s:40:64
H A Dc-index-getCursor-test.m122 // CHECK: [46:10 - 46:13] DeclRefExpr=bee:45:8
141 // CHECK: [49:2 - 49:3] DeclRefExpr=d:48:13
143 // CHECK: [49:6 - 49:7] DeclRefExpr=c:47:12
146 // CHECK: [50:3 - 50:4] DeclRefExpr=d:48:13
150 // CHECK: [51:3 - 51:6] DeclRefExpr=bee:45:8
153 // CHECK: [51:27 - 51:30] DeclRefExpr=bee:45:8
157 // CHECK: [52:3 - 52:7] DeclRefExpr=main:44:5
159 // CHECK: [52:8 - 52:16] DeclRefExpr=someEnum:41:3
162 // CHECK: [52:33 - 52:36] DeclRefExpr=bee:45:8
/llvm-project-15.0.7/mlir/test/mlir-pdll/Parser/
H A Dexpr.pdll24 // CHECK: `-DeclRefExpr {{.*}} Type<Constraint>
38 // CHECK: `-DeclRefExpr {{.*}} Type<Rewrite>
129 // CHECK: `-DeclRefExpr {{.*}} Type<TypeRange>
166 // CHECK: |-DeclRefExpr {{.*}} Type<Value>
168 // CHECK: `-DeclRefExpr {{.*}} Type<Value>
195 // CHECK: `-DeclRefExpr {{.*}} Type<Attr>
207 // CHECK: |-DeclRefExpr {{.*}} Type<Type>
208 // CHECK: |-DeclRefExpr {{.*}} Type<TypeRange>
209 // CHECK: `-DeclRefExpr {{.*}} Type<Type>
225 // CHECK: |-DeclRefExpr {{.*}} Type<Attr>
[all …]
H A Dstmt.pdll24 // CHECK: `-DeclRefExpr {{.*}} Type<Op>
74 // CHECK: `-DeclRefExpr {{.*}} Type<Op<dialect.op>>
93 // CHECK: `-DeclRefExpr {{.*}} Type<Op<dialect.op>>
130 // CHECK: `-DeclRefExpr {{.*}} Type<Type>
148 // CHECK: `-DeclRefExpr {{.*}} Type<TypeRange>
165 // CHECK: `-DeclRefExpr {{.*}} Type<Op>
176 // CHECK: `-DeclRefExpr {{.*}} Type<Op>
178 // CHECK: |-DeclRefExpr {{.*}} Type<Value>
179 // CHECK: |-DeclRefExpr {{.*}} Type<ValueRange>
194 // CHECK: |-DeclRefExpr {{.*}} Type<Op>
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DUseAfterMoveCheck.cpp51 const DeclRefExpr *DeclRef;
156 llvm::SmallVector<const DeclRefExpr *, 1> Uses; in findInternal()
175 for (const DeclRefExpr *Use : Uses) { in findInternal()
216 llvm::SmallVectorImpl<const DeclRefExpr *> *Uses, in getUsesAndReinits()
218 llvm::SmallPtrSet<const DeclRefExpr *, 1> DeclRefs; in getUsesAndReinits()
219 llvm::SmallPtrSet<const DeclRefExpr *, 1> ReinitDeclRefs; in getUsesAndReinits()
226 for (const DeclRefExpr *DeclRef : DeclRefs) { in getUsesAndReinits()
232 llvm::sort(*Uses, [](const DeclRefExpr *D1, const DeclRefExpr *D2) { in getUsesAndReinits()
259 llvm::SmallPtrSetImpl<const DeclRefExpr *> *DeclRefs) { in getDeclRefs()
298 llvm::SmallPtrSetImpl<const DeclRefExpr *> *DeclRefs) { in getReinits()
[all …]
H A DRedundantBranchConditionCheck.cpp81 const DeclRefExpr *OuterIfVar, *InnerIfVar; in check()
82 if (const auto *Inner = Result.Nodes.getNodeAs<DeclRefExpr>(InnerIfVar1Str)) in check()
85 InnerIfVar = Result.Nodes.getNodeAs<DeclRefExpr>(InnerIfVar2Str); in check()
86 if (const auto *Outer = Result.Nodes.getNodeAs<DeclRefExpr>(OuterIfVar1Str)) in check()
89 OuterIfVar = Result.Nodes.getNodeAs<DeclRefExpr>(OuterIfVar2Str); in check()
114 if (isa<DeclRefExpr>(InnerIf->getCond()->IgnoreParenImpCasts()) || in check()
121 dyn_cast<DeclRefExpr>(BinOpCond->getLHS()->IgnoreParenImpCasts()); in check()
163 dyn_cast<DeclRefExpr>(CondOp->getLHS()->IgnoreParenImpCasts()); in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DDeclRefExprUtils.h31 llvm::SmallPtrSet<const DeclRefExpr *, 16>
35 llvm::SmallPtrSet<const DeclRefExpr *, 16>
40 llvm::SmallPtrSet<const DeclRefExpr *, 16>
46 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
51 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
H A DDeclRefExprUtils.cpp44 SmallPtrSet<const DeclRefExpr *, 16>
58 SmallPtrSet<const DeclRefExpr *, 16> DeclRefs; in constReferenceDeclRefExprs()
100 SmallPtrSet<const DeclRefExpr *, 16>
105 SmallPtrSet<const DeclRefExpr *, 16> DeclRefs; in allDeclRefExprs()
110 SmallPtrSet<const DeclRefExpr *, 16>
116 SmallPtrSet<const DeclRefExpr *, 16> DeclRefs; in allDeclRefExprs()
121 bool isCopyConstructorArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyConstructorArgument()
135 bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl, in isCopyAssignmentArgument()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DDeadStoresChecker.cpp55 bool VisitDeclRefExpr(DeclRefExpr *DR) { in VisitDeclRefExpr()
286 void CheckDeclRef(const DeclRefExpr *DR, const Expr *Val, DeadStoreKind dsk, in CheckDeclRef()
302 const DeclRefExpr *DR; in isIncrement()
304 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getLHS()->IgnoreParenCasts()))) in isIncrement()
308 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getRHS()->IgnoreParenCasts()))) in isIncrement()
329 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(B->getLHS())) in observeStmt()
347 if (const DeclRefExpr *RhsDR = dyn_cast<DeclRefExpr>(RHS)) in observeStmt()
369 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex)) in observeStmt()
418 if (const DeclRefExpr *DRE = in observeStmt()
419 dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in observeStmt()
[all …]
H A DMallocOverflowSecurityChecker.cpp105 } else if (isa<DeclRefExpr, MemberExpr>(e)) in CheckMallocArgument()
142 static const Decl *getDecl(const DeclRefExpr *DR) { return DR->getDecl(); } in getDecl()
164 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in CheckExpr()
165 Erase<DeclRefExpr>(DR, PrecedesMalloc); in CheckExpr()
221 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in CheckAssignmentExpr()
222 Erase<DeclRefExpr>(DR, pred); in CheckAssignmentExpr()
H A DUndefCapturedBlockVarChecker.cpp36 static const DeclRefExpr *FindBlockDeclRefExpr(const Stmt *S, in FindBlockDeclRefExpr()
38 if (const DeclRefExpr *BR = dyn_cast<DeclRefExpr>(S)) in FindBlockDeclRefExpr()
44 if (const DeclRefExpr *BR = FindBlockDeclRefExpr(Child, VD)) in FindBlockDeclRefExpr()
H A DCStringSyntaxChecker.cpp39 if (const auto *D1 = dyn_cast<DeclRefExpr>(A1->IgnoreParenCasts())) in sameDecl()
40 if (const auto *D2 = dyn_cast<DeclRefExpr>(A2->IgnoreParenCasts())) in sameDecl()
73 if (const auto *D = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in getPrintableName()
159 const auto *DstArgDRE = dyn_cast<DeclRefExpr>(DstArg->IgnoreParenImpCasts()); in containsBadStrlcpyStrlcatPattern()
161 dyn_cast<DeclRefExpr>(LenArg->IgnoreParenLValueCasts()); in containsBadStrlcpyStrlcatPattern()
190 DstArgDRE = dyn_cast<DeclRefExpr>(BE->getLHS()->IgnoreParenImpCasts()); in containsBadStrlcpyStrlcatPattern()
/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()
108 const auto &DeclRefExpr = **AllDeclRefExprs.begin(); in check() local
110 if (!hasLoopStmtAncestor(DeclRefExpr, *Function, *Result.Context) && in check()
113 DeclRefExpr, *Function, *Result.Context)) || in check()
116 DeclRefExpr, *Function, *Result.Context)))) { in check()
117 handleMoveFix(*Param, DeclRefExpr, *Result.Context); in check()
178 const DeclRefExpr &CopyArgument, in handleMoveFix()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DCheckerHelpers.cpp39 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsEnum()
53 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsStaticLocal()
89 if (auto DE = dyn_cast_or_null<DeclRefExpr>(Assign->getLHS())) in parseAssignment()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DElseAfterReturnCheck.cpp51 static const DeclRefExpr *findUsage(const Stmt *Node, int64_t DeclIdentifier) { in findUsage()
54 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Node)) { in findUsage()
59 if (const DeclRefExpr *Result = findUsage(ChildNode, DeclIdentifier)) in findUsage()
66 static const DeclRefExpr *
71 if (const auto *DeclRef = dyn_cast<DeclRefExpr>(Node)) { in findUsageRange()
76 if (const DeclRefExpr *Result = in findUsageRange()
84 static const DeclRefExpr *checkInitDeclUsageInElse(const IfStmt *If) { in checkInitDeclUsageInElse()
101 static const DeclRefExpr *checkConditionVarUsageInElse(const IfStmt *If) { in checkConditionVarUsageInElse()
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DTransProtectedScope.cpp27 SmallVectorImpl<DeclRefExpr *> &Refs;
30 LocalRefsCollector(SmallVectorImpl<DeclRefExpr *> &refs) in LocalRefsCollector()
33 bool VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr()
100 SmallVector<DeclRefExpr *, 16> LocalRefs;
183 DeclRefExpr *DRE = LocalRefs[i]; in hasVarReferencedOutside()
H A DTransAutoreleasePool.cpp56 if (DeclRefExpr *DE = dyn_cast<DeclRefExpr>(instance)) { in VisitObjCMessageExpr()
188 if (DeclRefExpr *dref = dyn_cast<DeclRefExpr>(bop->getLHS())) { in VisitCompoundStmt()
263 bool VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr()
309 isa<DeclRefExpr>(retS->getRetValue()->IgnoreParenCasts())) && in handlePoolScope()
380 if (DeclRefExpr *dref = dyn_cast<DeclRefExpr>(rec)) in isPoolDrain()
/llvm-project-15.0.7/clang/lib/Analysis/
H A DUninitializedValues.cpp224 const DeclRefExpr *dr;
229 const DeclRefExpr *getDeclRefExpr() const { return dr; } in getDeclRefExpr()
277 llvm::DenseMap<const DeclRefExpr *, Class> Classification;
297 Class get(const DeclRefExpr *DRE) const { in get()
298 llvm::DenseMap<const DeclRefExpr*, Class>::const_iterator I in get()
313 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr()
318 dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr()
367 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify()
375 if (const DeclRefExpr *DRE = getSelfInitExpr(VD)) in VisitDeclStmt()
489 void VisitDeclRefExpr(DeclRefExpr *dr);
[all …]
/llvm-project-15.0.7/clang/test/AST/HLSL/
H A Dvector-constructors.hlsl31 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'float2':'float __attribute__((ext_vector_ty…
35 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'float2':'float __attribute__((ext_vector_ty…
61 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'float' lvalue Var 0x{{[0-9a-fA-F]+}} 'f' '…
63 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:27> 'float' lvalue Var 0x{{[0-9a-fA-F]+}} 'g' '…
85 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'int' lvalue Var 0x{{[0-9a-fA-F]+}} 'i' 'int'
88 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:27> 'int' lvalue Var 0x{{[0-9a-fA-F]+}} 'j' 'int'
99 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'struct S':'S' lvalue Var 0x{{[0-9a-fA-F]+}}…
102 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:29> 'struct S':'S' lvalue Var 0x{{[0-9a-fA-F]+}}…
117 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'struct T':'T' lvalue Var 0x{{[0-9a-fA-F]+}}…
122 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:27> 'struct T':'T' lvalue Var 0x{{[0-9a-fA-F]+}}…
/llvm-project-15.0.7/clang/lib/Sema/
H A DScopeInfo.cpp77 D = cast<DeclRefExpr>(E)->getDecl(); in getBaseInfo()
140 const DeclRefExpr *DRE) in WeakObjectProfileTy()
193 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse()
236 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures()

12345678910>>...12