| /openbsd-src/gnu/llvm/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | DeadStoresChecker.cpp | 55 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 D | MallocOverflowSecurityChecker.cpp | 106 } 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 D | UndefCapturedBlockVarChecker.cpp | 37 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 D | CStringSyntaxChecker.cpp | 39 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 D | IdenticalExprChecker.cpp | 225 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 D | CheckSecuritySyntaxOnly.cpp | 228 static const DeclRefExpr* 237 if (const DeclRefExpr *lhs = getIncrementedVar(B->getLHS(), x, y)) in getIncrementedVar() 240 if (const DeclRefExpr *rhs = getIncrementedVar(B->getRHS(), x, y)) in getIncrementedVar() 246 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(expr)) { in getIncrementedVar() 293 const DeclRefExpr *drLHS = in checkLoopConditionForFloat() 294 dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParenLValueCasts()); in checkLoopConditionForFloat() 295 const DeclRefExpr *drRHS = in checkLoopConditionForFloat() 296 dyn_cast<DeclRefExpr>(B->getRHS()->IgnoreParenLValueCasts()); in checkLoopConditionForFloat() 312 const DeclRefExpr *drInc = getIncrementedVar(increment, vdLHS, vdRHS); in checkLoopConditionForFloat() 321 const DeclRefExpr *drCond = vdLHS == vdInc ? drLHS : drRHS; in checkLoopConditionForFloat()
|
| H A D | DereferenceChecker.cpp | 72 const DeclRefExpr *DR = cast<DeclRefExpr>(Ex); in AddDerefSource() 149 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference()
|
| /openbsd-src/gnu/llvm/clang/lib/Analysis/ |
| H A D | UnsafeBufferUsage.cpp | 123 using DeclUseList = SmallVector<const DeclRefExpr *, 1>; 238 SmallVector<const DeclRefExpr *, 2> Uses; in getClaimedVarUseSites() 240 dyn_cast<DeclRefExpr>(Op->getSubExpr()->IgnoreParenImpCasts())) { in getClaimedVarUseSites() 274 dyn_cast<DeclRefExpr>(Op->getSubExpr()->IgnoreParenImpCasts())) { in getClaimedVarUseSites() 313 dyn_cast<DeclRefExpr>(ASE->getBase()->IgnoreParenImpCasts())) { in getClaimedVarUseSites() 360 dyn_cast<DeclRefExpr>(Ptr->IgnoreParenImpCasts())) { in getClaimedVarUseSites() 376 using UseSetTy = SmallSet<const DeclRefExpr *, 16>; 390 void discoverUse(const DeclRefExpr *DRE) { Uses->insert(DRE); } in discoverUse() 393 void claimUse(const DeclRefExpr *DRE) { in claimUse() 402 return any_of(*Uses, [VD](const DeclRefExpr *DRE) { in hasUnclaimedUses() [all …]
|
| H A D | UninitializedValues.cpp | 221 const DeclRefExpr *dr; 224 FindVarResult(const VarDecl *vd, const DeclRefExpr *dr) : vd(vd), dr(dr) {} in FindVarResult() 226 const DeclRefExpr *getDeclRefExpr() const { return dr; } in getDeclRefExpr() 250 dyn_cast<DeclRefExpr>(stripCasts(DC->getParentASTContext(), E))) in findVar() 274 llvm::DenseMap<const DeclRefExpr *, Class> Classification; 294 Class get(const DeclRefExpr *DRE) const { in get() 295 llvm::DenseMap<const DeclRefExpr*, Class>::const_iterator I in get() 310 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() 315 dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr() 364 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify() [all …]
|
| H A D | CalledOnceCheck.cpp | 285 : 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 D | LiveVariables.cpp | 37 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 D | BodyFarm.cpp | 66 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()
|
| /openbsd-src/gnu/llvm/clang/lib/StaticAnalyzer/Core/ |
| H A D | CheckerHelpers.cpp | 40 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsEnum() 54 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(S); in containsStaticLocal() 90 if (auto DE = dyn_cast_or_null<DeclRefExpr>(Assign->getLHS())) in parseAssignment()
|
| /openbsd-src/gnu/llvm/clang/lib/ARCMigrate/ |
| H A D | TransProtectedScope.cpp | 27 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 D | TransAutoreleasePool.cpp | 56 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 D | TransBlockObjCVariable.cpp | 51 if (DeclRefExpr * in TraverseImplicitCastExpr() 52 ref = dyn_cast<DeclRefExpr>(castE->getSubExpr())) { in TraverseImplicitCastExpr() 65 bool VisitDeclRefExpr(DeclRefExpr *E) { in VisitDeclRefExpr()
|
| H A D | TransARCAssign.cpp | 48 DeclRefExpr *declRef = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts()); in VisitBinaryOperator()
|
| H A D | TransGCCalls.cpp | 46 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) { in VisitCallExpr()
|
| /openbsd-src/gnu/llvm/clang/lib/Sema/ |
| H A D | ScopeInfo.cpp | 78 D = cast<DeclRefExpr>(E)->getDecl(); in getBaseInfo() 141 const DeclRefExpr *DRE) in WeakObjectProfileTy() 194 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse() 237 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures()
|
| H A D | SemaOpenMP.cpp | 76 DeclRefExpr *PrivateCopy = nullptr; 81 const Expr *RefExpr, DeclRefExpr *PrivateCopy, in DSAVarData() 109 DeclRefExpr *PrivateCopy = nullptr; 196 llvm::SmallVector<DeclRefExpr *, 4> DeclareTargetLinkVarDecls; 545 DeclRefExpr *PrivateCopy = nullptr, unsigned Modifier = 0, 583 cast<DeclRefExpr>(getStackElemAtLevel(Level).TaskgroupReductionRef) in isTaskgroupReductionRef() 1087 void addToParentTargetRegionLinkGlobals(DeclRefExpr *E) { in addToParentTargetRegionLinkGlobals() 1101 ArrayRef<DeclRefExpr *> getLinkGlobals() const { in getLinkGlobals() 1490 DeclRefExpr *PrivateCopy, unsigned Modifier, in addDSA() 1530 DeclRefExpr *OrigRef = nullptr) { in buildVarDecl() [all …]
|
| H A D | HLSLExternalSemaSource.cpp | 129 static DeclRefExpr *lookupBuiltinFunction(ASTContext &AST, Sema &S, in lookupBuiltinFunction() 141 return DeclRefExpr::Create(AST, NestedNameSpecifierLoc(), SourceLocation(), in lookupBuiltinFunction() 171 DeclRefExpr *Fn = in addDefaultHandleConstructor() 272 auto *IndexExpr = DeclRefExpr::Create( in addArraySubscriptOperator() 444 DeclRefExpr::Create( in defineHLSLVectorAlias()
|
| /openbsd-src/gnu/llvm/clang/lib/CodeGen/ |
| H A D | CGStmtOpenMP.cpp | 94 DeclRefExpr DRE( in OMPLexicalScope() 146 const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl()); in emitPreInitStmt() 155 cast<VarDecl>(cast<DeclRefExpr>(IRef)->getDecl()); in emitPreInitStmt() 233 const Decl *D = cast<DeclRefExpr>(E)->getDecl(); in OMPSimdLexicalScope() 249 CGF.EmitVarDecl(*cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl())); in OMPSimdLexicalScope() 258 CopyArrayTemps.insert(cast<DeclRefExpr>(E)->getDecl()); in OMPSimdLexicalScope() 269 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope() 291 if (const auto *OrigDRE = dyn_cast<DeclRefExpr>(E)) { in EmitOMPSharedLValue() 298 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue() 812 cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl())->getCanonicalDecl(), in EmitOMPFirstprivateClause() [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/Analysis/Analyses/ |
| H A D | LiveVariables.h | 25 class DeclRefExpr; variable 67 virtual void observerKill(const DeclRefExpr *DR) {} in observerKill()
|
| /openbsd-src/gnu/llvm/clang/lib/Frontend/Rewrite/ |
| H A D | RewriteObjC.cpp | 125 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 D | RewriteModernObjC.cpp | 135 SmallVector<DeclRefExpr *, 32> InnerDeclRefs; 137 SmallVector<DeclRefExpr *, 32> BlockDeclRefs; 391 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD); 392 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE); 482 const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs); 495 SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs, 1719 DeclRefExpr *DR = cast<DeclRefExpr>(S->getElement()); in RewriteObjCForCollectionStmt() 2104 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() 2591 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() 2592 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral() [all …]
|