Home
last modified time | relevance | path

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

1234567

/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DDeadStoresChecker.cpp54 bool VisitDeclRefExpr(DeclRefExpr *DR) override { in VisitDeclRefExpr()
285 void CheckDeclRef(const DeclRefExpr *DR, const Expr *Val, DeadStoreKind dsk, in CheckDeclRef()
301 const DeclRefExpr *DR; in isIncrement()
303 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getLHS()->IgnoreParenCasts()))) in isIncrement()
307 if ((DR = dyn_cast<DeclRefExpr>(BRHS->getRHS()->IgnoreParenCasts()))) in isIncrement()
328 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(B->getLHS())) in observeStmt()
345 if (const DeclRefExpr *RhsDR = dyn_cast<DeclRefExpr>(RHS)) in observeStmt()
367 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex)) in observeStmt()
416 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in observeStmt()
497 if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(E)) in operator ()()
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 DDereferenceChecker.cpp77 const DeclRefExpr *DR = cast<DeclRefExpr>(Ex); in AddDerefSource()
156 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference()
H A DMacOSKeychainAPIChecker.cpp157 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in REGISTER_MAP_WITH_PROGRAMSTATE()
354 if (const DeclRefExpr *DE = dyn_cast<DeclRefExpr>(DeallocatorExpr)) { in checkPreStmt()
/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.cpp63 static std::string getDREAncestorString(const DeclRefExpr *DRE, in getDREAncestorString()
444 return cast<DeclRefExpr>(E1)->getDecl() == cast<DeclRefExpr>(E2)->getDecl(); in areEqualIntegers()
475 auto *DREOfPtr = dyn_cast<DeclRefExpr>( in isPtrBufferSafe()
477 auto *DREOfSize = dyn_cast<DeclRefExpr>( in isPtrBufferSafe()
517 if (auto *DRE = dyn_cast<DeclRefExpr>(Ptr->IgnoreParenImpCasts())) { in isPtrBufferSafe()
574 if (auto *DRE0 = dyn_cast<DeclRefExpr>(E0)) in isSafeSpanTwoParamConstruct()
575 if (auto *DRE1 = dyn_cast<DeclRefExpr>(E1)) { in isSafeSpanTwoParamConstruct()
1153 using DeclUseList = SmallVector<const DeclRefExpr *, 1>;
1253 static bool isSupportedVariable(const DeclRefExpr &Node) { in isSupportedVariable()
1295 SmallVector<const DeclRefExpr *, 2> Uses; in getClaimedVarUseSites()
[all …]
H A DUninitializedValues.cpp236 const DeclRefExpr *dr;
239 FindVarResult(const VarDecl *vd, const DeclRefExpr *dr) : vd(vd), dr(dr) {} in FindVarResult()
241 const DeclRefExpr *getDeclRefExpr() const { return dr; } in getDeclRefExpr()
265 dyn_cast<DeclRefExpr>(stripCasts(DC->getParentASTContext(), E))) in findVar()
283 llvm::DenseMap<const DeclRefExpr *, Class> Classification;
303 Class get(const DeclRefExpr *DRE) const { in get()
304 llvm::DenseMap<const DeclRefExpr*, Class>::const_iterator I in get()
319 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr()
324 dyn_cast<DeclRefExpr>(stripCasts(VD->getASTContext(), Init)); in getSelfInitExpr()
373 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) { in classify()
[all …]
H A DCalledOnceCheck.cpp283 : public ConstStmtVisitor<DeclRefFinder, const DeclRefExpr *> {
307 static const DeclRefExpr *find(const Expr *E, in find()
312 const DeclRefExpr *VisitDeclRefExpr(const DeclRefExpr *DR) { return DR; } in VisitDeclRefExpr()
314 const DeclRefExpr *VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator()
331 const DeclRefExpr *VisitBinaryOperator(const BinaryOperator *BO) { in VisitBinaryOperator()
338 const DeclRefExpr *LHS = Visit(BO->getLHS()); in VisitBinaryOperator()
346 const DeclRefExpr *VisitOpaqueValueExpr(const OpaqueValueExpr *OVE) { in VisitOpaqueValueExpr()
350 const DeclRefExpr *VisitCallExpr(const CallExpr *CE) { in VisitCallExpr()
361 const DeclRefExpr *Candidate = Visit(CE->getArg(0)); in VisitCallExpr()
373 const DeclRefExpr *VisitExpr(const Expr *E) { in VisitExpr()
[all …]
H A DLiveVariables.cpp38 llvm::DenseMap<const DeclRefExpr *, unsigned> inAssignment;
173 void VisitDeclRefExpr(DeclRefExpr *DR);
372 if (const auto *DR = dyn_cast<DeclRefExpr>(B->getLHS()->IgnoreParens())) { in VisitBinaryOperator()
383 if (DeclRefExpr *DR = dyn_cast<DeclRefExpr>(LHS)) { in VisitBinaryOperator()
417 void TransferFunctions::VisitDeclRefExpr(DeclRefExpr *DR) { in VisitDeclRefExpr()
455 DeclRefExpr *DR = nullptr; in VisitObjCForCollectionStmt()
462 else if ((DR = dyn_cast<DeclRefExpr>(cast<Expr>(element)->IgnoreParens()))) { in VisitObjCForCollectionStmt()
506 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()
H A DReachableCode.cpp37 const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Ex); in isEnumConstant()
64 if (const auto *DRE = dyn_cast<DeclRefExpr>(S)) in isBuiltinUnreachable()
220 return isConfigurationValue(cast<DeclRefExpr>(S)->getDecl(), PP); in isConfigurationValue()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DScopeInfo.cpp79 D = cast<DeclRefExpr>(E)->getDecl(); in getBaseInfo()
142 const DeclRefExpr *DRE) in WeakObjectProfileTy()
195 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse()
238 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.cpp84 DeclRefExpr *PrivateCopy = nullptr;
89 const Expr *RefExpr, DeclRefExpr *PrivateCopy, in DSAVarData()
116 DeclRefExpr *PrivateCopy = nullptr;
203 llvm::SmallVector<DeclRefExpr *, 4> DeclareTargetLinkVarDecls;
552 DeclRefExpr *PrivateCopy = nullptr, unsigned Modifier = 0,
590 cast<DeclRefExpr>(getStackElemAtLevel(Level).TaskgroupReductionRef) in isTaskgroupReductionRef()
1094 void addToParentTargetRegionLinkGlobals(DeclRefExpr *E) { in addToParentTargetRegionLinkGlobals()
1108 ArrayRef<DeclRefExpr *> getLinkGlobals() const { in getLinkGlobals()
1491 DeclRefExpr *PrivateCopy, unsigned Modifier, in addDSA()
1531 DeclRefExpr *OrigRef = nullptr) { in buildVarDecl()
[all …]
H A DSemaStmtAsm.cpp140 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in CheckNakedParmReference()
191 if (const DeclRefExpr *AsmDeclRef = dyn_cast<DeclRefExpr>(Expression)) { in extractRegisterName()
798 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DRawPtrRefLocalVarsChecker.cpp61 if (auto *VarRef = dyn_cast<DeclRefExpr>(BO->getLHS())) { in VisitBinaryOperator()
73 if (auto *VarRef = dyn_cast<DeclRefExpr>(Arg)) { in VisitCXXConstructExpr()
87 if (auto *VarRef = dyn_cast<DeclRefExpr>(ThisArg)) { in VisitCXXMemberCallExpr()
99 if (auto *VarRef = dyn_cast<DeclRefExpr>(ThisArg)) { in VisitCXXOperatorCallExpr()
227 if (auto *VarRef = dyn_cast<DeclRefExpr>(BO->getLHS())) { in checkASTDecl()
313 if (auto *Ref = llvm::dyn_cast<DeclRefExpr>(InitArgOrigin)) { in visitVarDecl()
H A DRawPtrRefLambdaCapturesChecker.cpp50 llvm::DenseSet<const DeclRefExpr *> DeclRefExprsToIgnore; in checkASTDecl()
111 bool VisitDeclRefExpr(DeclRefExpr *DRE) override { in checkASTDecl()
225 auto *DRE = dyn_cast<DeclRefExpr>(CtorArg); in checkASTDecl()
249 auto *DRE = dyn_cast<DeclRefExpr>(Callee->IgnoreParenCasts()); in checkASTDecl()
260 auto *ArgRef = dyn_cast<DeclRefExpr>(Arg); in checkASTDecl()
355 if (auto *DRE = dyn_cast<DeclRefExpr>(Arg)) { in checkASTDecl()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp102 DeclRefExpr DRE( in OMPLexicalScope()
154 const auto *VD = cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl()); in emitPreInitStmt()
163 cast<VarDecl>(cast<DeclRefExpr>(IRef)->getDecl()); in emitPreInitStmt()
265 const Decl *D = cast<DeclRefExpr>(E)->getDecl(); in OMPSimdLexicalScope()
281 CGF.EmitVarDecl(*cast<VarDecl>(cast<DeclRefExpr>(E)->getDecl())); in OMPSimdLexicalScope()
290 CopyArrayTemps.insert(cast<DeclRefExpr>(E)->getDecl()); in OMPSimdLexicalScope()
301 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope()
347 if (const auto *OrigDRE = dyn_cast<DeclRefExpr>(E)) { in EmitOMPSharedLValue()
354 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue()
874 cast<VarDecl>(cast<DeclRefExpr>(D)->getDecl())->getCanonicalDecl(), in EmitOMPFirstprivateClause()
[all …]
H A DCGOpenMPRuntime.cpp370 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in CGOpenMPInnerExprInfo()
588 dyn_cast<DeclRefExpr>(OVE->getSourceExpr()->IgnoreImpCasts())) in getReductionInit()
607 cast<DeclRefExpr>(cast<UnaryOperator>(LHS)->getSubExpr()); in emitInitWithReductionInitializer()
609 cast<DeclRefExpr>(cast<UnaryOperator>(RHS)->getSubExpr()); in emitInitWithReductionInitializer()
755 cast<VarDecl>(cast<DeclRefExpr>(ClausesData[N].Private)->getDecl()); in emitAggregateInitialization()
855 cast<VarDecl>(cast<DeclRefExpr>(ClausesData[N].Private)->getDecl()); in emitInitialization()
940 static const VarDecl *getBaseDecl(const Expr *Ref, const DeclRefExpr *&DE) { in getBaseDecl()
948 DE = cast<DeclRefExpr>(Base); in getBaseDecl()
954 DE = cast<DeclRefExpr>(Base); in getBaseDecl()
962 const DeclRefExpr *DE; in adjustPrivateAddress()
[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 DRewriteObjC.cpp126 SmallVector<DeclRefExpr *, 32> InnerDeclRefs;
128 SmallVector<DeclRefExpr *, 32> BlockDeclRefs;
316 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD);
317 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
389 const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs);
403 SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs,
1509 DeclRefExpr *DR = cast<DeclRefExpr>(S->getElement()); in RewriteObjCForCollectionStmt()
2018 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2515 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2516 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
[all …]
H A DRewriteModernObjC.cpp136 SmallVector<DeclRefExpr *, 32> InnerDeclRefs;
138 SmallVector<DeclRefExpr *, 32> BlockDeclRefs;
389 Stmt *RewriteBlockDeclRefExpr(DeclRefExpr *VD);
390 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
480 const SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs);
493 SmallVectorImpl<DeclRefExpr *> &InnerBlockDeclRefs,
1717 DeclRefExpr *DR = cast<DeclRefExpr>(S->getElement()); in RewriteObjCForCollectionStmt()
2102 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl()
2589 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral()
2590 DeclRefExpr(*Context, NewVD, false, strType, VK_LValue, SourceLocation()); in RewriteObjCStringLiteral()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DExpr.cpp214 else if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isFlexibleArrayMemberLike()
429 DeclRefExpr::DeclRefExpr(const ASTContext &Ctx, ValueDecl *D, in DeclRefExpr() function in DeclRefExpr
448 DeclRefExpr::DeclRefExpr(const ASTContext &Ctx, in DeclRefExpr() function in DeclRefExpr
487 DeclRefExpr *DeclRefExpr::Create(const ASTContext &Context, in Create()
501 DeclRefExpr *DeclRefExpr::Create(const ASTContext &Context, in Create()
522 void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); in Create()
523 return new (Mem) DeclRefExpr(Context, QualifierLoc, TemplateKWLoc, D, in Create()
528 DeclRefExpr *DeclRefExpr::CreateEmpty(const ASTContext &Context, in CreateEmpty()
539 void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); in CreateEmpty()
540 return new (Mem) DeclRefExpr(EmptyShell()); in CreateEmpty()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DScopeInfo.h296 WeakObjectProfileTy(const DeclRefExpr *RE);
993 assert(isa<DeclRefExpr>(VarExpr) || isa<MemberExpr>(VarExpr) || in addPotentialCapture()
1046 assert(isa<DeclRefExpr>(CapturingVarExpr) || in markVariableExprAsNonODRUsed()
1052 assert(isa<DeclRefExpr>(CapturingVarExpr) || in isVariableExprMarkedAsNonODRUsed()

1234567