Home
last modified time | relevance | path

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

1234567

/src/contrib/llvm-project/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()
346 if (const DeclRefExpr *RhsDR = dyn_cast<DeclRefExpr>(RHS)) in observeStmt()
368 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex)) in observeStmt()
417 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in observeStmt()
498 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in operator ()()
H A DMallocOverflowSecurityChecker.cpp106 } else if (isa<DeclRefExpr, MemberExpr>(e)) in CheckMallocArgument()
143 static const Decl *getDecl(const DeclRefExpr *DR) { return DR->getDecl(); } in getDecl()
165 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in CheckExpr()
166 Erase<DeclRefExpr>(DR, PrecedesMalloc); in CheckExpr()
222 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in CheckAssignmentExpr()
223 Erase<DeclRefExpr>(DR, pred); in CheckAssignmentExpr()
H A DUndefCapturedBlockVarChecker.cpp37 static const DeclRefExpr *FindBlockDeclRefExpr(const Stmt *S, in FindBlockDeclRefExpr()
39 if (const DeclRefExpr *BR = dyn_cast<DeclRefExpr>(S)) in FindBlockDeclRefExpr()
45 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()
H A DIdenticalExprChecker.cpp225 const DeclRefExpr *DeclRef1 = dyn_cast<DeclRefExpr>(LHS); in checkComparisonOp()
226 const DeclRefExpr *DeclRef2 = dyn_cast<DeclRefExpr>(RHS); in checkComparisonOp()
462 const DeclRefExpr *DeclRef1 = cast<DeclRefExpr>(Stmt1); in isIdenticalStmt()
463 const DeclRefExpr *DeclRef2 = cast<DeclRefExpr>(Stmt2); in isIdenticalStmt()
H A DCheckSecuritySyntaxOnly.cpp226 static const DeclRefExpr*
235 if (const DeclRefExpr *lhs = getIncrementedVar(B->getLHS(), x, y)) in getIncrementedVar()
238 if (const DeclRefExpr *rhs = getIncrementedVar(B->getRHS(), x, y)) in getIncrementedVar()
244 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(expr)) { in getIncrementedVar()
291 const DeclRefExpr *drLHS = in checkLoopConditionForFloat()
292 dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParenLValueCasts()); in checkLoopConditionForFloat()
293 const DeclRefExpr *drRHS = in checkLoopConditionForFloat()
294 dyn_cast<DeclRefExpr>(B->getRHS()->IgnoreParenLValueCasts()); in checkLoopConditionForFloat()
310 const DeclRefExpr *drInc = getIncrementedVar(increment, vdLHS, vdRHS); in checkLoopConditionForFloat()
319 const DeclRefExpr *drCond = vdLHS == vdInc ? drLHS : drRHS; in checkLoopConditionForFloat()
/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DCheckerHelpers.cpp41 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsEnum()
55 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsStaticLocal()
91 if (auto DE = dyn_cast_or_null<DeclRefExpr>(Assign->getLHS())) in parseAssignment()
/src/contrib/llvm-project/clang/lib/Analysis/
H A DUnsafeBufferUsage.cpp57 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()
[all …]
H A DUninitializedValues.cpp239 const DeclRefExpr *dr;
242 FindVarResult(const VarDecl *vd, const DeclRefExpr *dr) : vd(vd), dr(dr) {} in FindVarResult()
244 const DeclRefExpr *getDeclRefExpr() const { return dr; } in getDeclRefExpr()
268 dyn_cast<DeclRefExpr>(stripCasts(DC->getParentASTContext(), E))) in findVar()
292 llvm::DenseMap<const DeclRefExpr *, Class> Classification;
312 Class get(const DeclRefExpr *DRE) const { in get()
313 llvm::DenseMap<const DeclRefExpr*, Class>::const_iterator I in get()
328 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr()
333 dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr()
382 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify()
[all …]
H A DCalledOnceCheck.cpp285 : public ConstStmtVisitor<DeclRefFinder, const DeclRefExpr *> {
309 static const DeclRefExpr *find(const Expr *E, in find()
314 const DeclRefExpr *VisitDeclRefExpr(const DeclRefExpr *DR) { return DR; } in VisitDeclRefExpr()
316 const DeclRefExpr *VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator()
333 const DeclRefExpr *VisitBinaryOperator(const BinaryOperator *BO) { in VisitBinaryOperator()
340 const DeclRefExpr *LHS = Visit(BO->getLHS()); in VisitBinaryOperator()
348 const DeclRefExpr *VisitOpaqueValueExpr(const OpaqueValueExpr *OVE) { in VisitOpaqueValueExpr()
352 const DeclRefExpr *VisitCallExpr(const CallExpr *CE) { in VisitCallExpr()
363 const DeclRefExpr *Candidate = Visit(CE->getArg(0)); in VisitCallExpr()
375 const DeclRefExpr *VisitExpr(const Expr *E) { in VisitExpr()
[all …]
H A DLiveVariables.cpp37 llvm::DenseMap<const DeclRefExpr *, unsigned> inAssignment;
172 void VisitDeclRefExpr(DeclRefExpr *DR);
335 if (const auto *DR = dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParens())) { in VisitBinaryOperator()
346 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(LHS)) { in VisitBinaryOperator()
380 void TransferFunctions::VisitDeclRefExpr(DeclRefExpr *DR) { in VisitDeclRefExpr()
418 DeclRefExpr *DR = nullptr; in VisitObjCForCollectionStmt()
425 else if ((DR = dyn_cast<DeclRefExpr>(cast<Expr>(element)->IgnoreParens()))) { in VisitObjCForCollectionStmt()
469 if (auto *DR = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) { in VisitUnaryOperator()
H A DBodyFarm.cpp66 DeclRefExpr *makeDeclRefExpr(const VarDecl *D,
142 DeclRefExpr *ASTMaker::makeDeclRefExpr( in makeDeclRefExpr()
147 DeclRefExpr *DR = DeclRefExpr::Create( in makeDeclRefExpr()
266 DeclRefExpr *Call = M.makeDeclRefExpr(Callback); in create_call_once_funcptr_call()
296 DeclRefExpr *callOperatorDeclRef = in create_call_once_lambda_call()
297 DeclRefExpr::Create(/* Ctx =*/ C, in create_call_once_lambda_call()
469 DeclRefExpr *FlagDecl = in create_call_once()
611 DeclRefExpr *DR = M.makeDeclRefExpr(PV); in create_dispatch_sync()
/src/contrib/llvm-project/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()
H A DTransBlockObjCVariable.cpp51 if (DeclRefExpr * in TraverseImplicitCastExpr()
52 ref = dyn_cast<DeclRefExpr>(castE->getSubExpr())) { in TraverseImplicitCastExpr()
65 bool VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr()
H A DTransARCAssign.cpp48 DeclRefExpr *declRef = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()); in VisitBinaryOperator()
H A DTransGCCalls.cpp46 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) { in VisitCallExpr()
/src/contrib/llvm-project/clang/lib/Sema/
H A DScopeInfo.cpp80 D = cast<DeclRefExpr>(E)->getDecl(); in getBaseInfo()
143 const DeclRefExpr *DRE) in WeakObjectProfileTy()
196 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse()
239 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures()
H A DSemaBPF.cpp50 if (!isa<DeclRefExpr>(Arg->IgnoreParens()) && in isValidPreserveTypeInfoArg()
92 const auto *DR = dyn_cast<DeclRefExpr>(CE->getSubExpr()); in isValidPreserveEnumValueArg()
H A DSemaOpenMP.cpp83 DeclRefExpr *PrivateCopy = nullptr;
88 const Expr *RefExpr, DeclRefExpr *PrivateCopy, in DSAVarData()
115 DeclRefExpr *PrivateCopy = nullptr;
206 llvm::SmallVector<DeclRefExpr *, 4> DeclareTargetLinkVarDecls;
555 DeclRefExpr *PrivateCopy = nullptr, unsigned Modifier = 0,
593 cast<DeclRefExpr>(getStackElemAtLevel(Level).TaskgroupReductionRef) in isTaskgroupReductionRef()
1114 void addToParentTargetRegionLinkGlobals(DeclRefExpr *E) { in addToParentTargetRegionLinkGlobals()
1128 ArrayRef<DeclRefExpr *> getLinkGlobals() const { in getLinkGlobals()
1515 DeclRefExpr *PrivateCopy, unsigned Modifier, in addDSA()
1555 DeclRefExpr *OrigRef = nullptr) { in buildVarDecl()
[all …]
/src/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp98 DeclRefExpr DRE( in OMPLexicalScope()
150 const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl()); in emitPreInitStmt()
159 cast<VarDecl>(cast<DeclRefExpr>(IRef)->getDecl()); in emitPreInitStmt()
259 const Decl *D = cast<DeclRefExpr>(E)->getDecl(); in OMPSimdLexicalScope()
275 CGF.EmitVarDecl(*cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl())); in OMPSimdLexicalScope()
284 CopyArrayTemps.insert(cast<DeclRefExpr>(E)->getDecl()); in OMPSimdLexicalScope()
295 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope()
317 if (const auto *OrigDRE = dyn_cast<DeclRefExpr>(E)) { in EmitOMPSharedLValue()
324 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue()
836 cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl())->getCanonicalDecl(), in EmitOMPFirstprivateClause()
[all …]
/src/contrib/llvm-project/clang/include/clang/Analysis/Analyses/
H A DLiveVariables.h25 class DeclRefExpr; variable
67 virtual void observerKill(const DeclRefExpr *DR) {} in observerKill()
/src/contrib/llvm-project/clang/lib/Frontend/Rewrite/
H A DRewriteObjC.cpp125 SmallVector<DeclRefExpr *, 32> InnerDeclRefs;
127 SmallVector<DeclRefExpr *, 32> BlockDeclRefs;
318 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD);
319 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
391 const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs);
405 SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs,
1511 DeclRefExpr *DR = cast<DeclRefExpr>(S->getElement()); in RewriteObjCForCollectionStmt()
2020 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2517 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2518 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
[all …]
H A DRewriteModernObjC.cpp135 SmallVector<DeclRefExpr *, 32> InnerDeclRefs;
137 SmallVector<DeclRefExpr *, 32> BlockDeclRefs;
390 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD);
391 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
481 const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs);
494 SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs,
1718 DeclRefExpr *DR = cast<DeclRefExpr>(S->getElement()); in RewriteObjCForCollectionStmt()
2103 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2590 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2591 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
[all …]
/src/contrib/llvm-project/clang/lib/AST/
H A DExpr.cpp215 else if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isFlexibleArrayMemberLike()
430 DeclRefExpr::DeclRefExpr(const ASTContext &Ctx, ValueDecl *D, in DeclRefExpr() function in DeclRefExpr
449 DeclRefExpr::DeclRefExpr(const ASTContext &Ctx, in DeclRefExpr() function in DeclRefExpr
488 DeclRefExpr *DeclRefExpr::Create(const ASTContext &Context, in Create()
502 DeclRefExpr *DeclRefExpr::Create(const ASTContext &Context, in Create()
523 void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); in Create()
524 return new (Mem) DeclRefExpr(Context, QualifierLoc, TemplateKWLoc, D, in Create()
529 DeclRefExpr *DeclRefExpr::CreateEmpty(const ASTContext &Context, in CreateEmpty()
540 void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); in CreateEmpty()
541 return new (Mem) DeclRefExpr(EmptyShell()); in CreateEmpty()
[all …]

1234567