Home
last modified time | relevance | path

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

1234567

/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
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 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 DDereferenceChecker.cpp74 const DeclRefExpr *DR = cast<DeclRefExpr>(Ex); in AddDerefSource()
151 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference()
/freebsd/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()
H A DLoopUnrolling.cpp169 static bool isCapturedByReference(ExplodedNode *N, const DeclRefExpr *DR) { in isCapturedByReference()
209 static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) { in isPossiblyEscaped()
280 const auto *CounterVarRef = Matches[0].getNodeAs<DeclRefExpr>("initVarRef"); in shouldCompletelyUnroll()
/freebsd/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()
/freebsd/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 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()
H A DTransZeroOutPropsInDealloc.cpp52 DeclRefExpr *refE = dyn_cast<DeclRefExpr>(receiver->IgnoreParenCasts()); in VisitObjCMessageExpr()
/freebsd/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 …]
H A DHLSLExternalSemaSource.cpp129 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction()
144 return DeclRefExpr::Create(AST, NestedNameSpecifierLoc(), SourceLocation(), in lookupBuiltinFunction()
174 DeclRefExpr *Fn = in addDefaultHandleConstructor()
272 auto *IndexExpr = DeclRefExpr::Create( in addArraySubscriptOperator()
462 DeclRefExpr::Create( in defineHLSLVectorAlias()
/freebsd/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 …]
/freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/
H A DLiveVariables.h25 class DeclRefExpr; variable
67 virtual void observerKill(const DeclRefExpr *DR) {} in observerKill()
/freebsd/contrib/llvm-project/clang/lib/Frontend/Rewrite/
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 …]
/freebsd/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 …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DUncountedLocalVarsChecker.cpp146 if (auto *VarRef = dyn_cast<DeclRefExpr>(BO->getLHS())) { in checkASTDecl()
214 if (auto *Ref = llvm::dyn_cast<DeclRefExpr>(InitArgOrigin)) { in visitVarDecl()
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DScopeInfo.h296 WeakObjectProfileTy(const DeclRefExpr *RE);
990 assert(isa<DeclRefExpr>(VarExpr) || isa<MemberExpr>(VarExpr) || in addPotentialCapture()
1043 assert(isa<DeclRefExpr>(CapturingVarExpr) || in markVariableExprAsNonODRUsed()
1049 assert(isa<DeclRefExpr>(CapturingVarExpr) || in isVariableExprMarkedAsNonODRUsed()

1234567