Home
last modified time | relevance | path

Searched refs:DRE (Results 1 – 25 of 85) sorted by relevance

1234

/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DUnsafeBufferUsage.cpp63 static std::string getDREAncestorString(const DeclRefExpr *DRE, in getDREAncestorString() argument
66 const Stmt *St = DRE; in getDREAncestorString()
517 if (auto *DRE = dyn_cast<DeclRefExpr>(Ptr->IgnoreParenImpCasts())) { in isPtrBufferSafe() local
518 if (auto *CAT = Ctx.getAsConstantArrayType(DRE->getType())) { in isPtrBufferSafe()
1296 if (const auto *DRE = in getClaimedVarUseSites() local
1298 Uses.push_back(DRE); in getClaimedVarUseSites()
1343 if (const auto *DRE = in getClaimedVarUseSites() local
1345 return {DRE}; in getClaimedVarUseSites()
1396 if (const auto *DRE = in getClaimedVarUseSites() local
1398 return {DRE}; in getClaimedVarUseSites()
[all …]
H A DUninitializedValues.cpp264 if (const auto *DRE = in findVar() local
266 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar()
268 return FindVarResult(VD, DRE); in findVar()
303 Class get(const DeclRefExpr *DRE) const { in get()
305 = Classification.find(DRE); in get()
309 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get()
323 const auto *DRE = in getSelfInitExpr() local
325 if (DRE && DRE->getDecl() == VD) in getSelfInitExpr()
326 return DRE; in getSelfInitExpr()
373 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) { in classify() local
[all …]
H A DThreadSafetyCommon.cpp325 til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, in translateDeclRefExpr() argument
327 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr()
504 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator() local
505 if (DRE->getDecl()->isCXXInstanceMember()) { in translateUnaryOperator()
509 return new (Arena) til::Project(W, DRE->getDecl()); in translateUnaryOperator()
563 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in translateBinAssign() local
564 VD = DRE->getDecl(); in translateBinAssign()
629 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { in translateCastExpr() local
630 til::SExpr *E0 = lookupVarDecl(DRE->getDecl()); in translateCastExpr()
H A DLifetimeSafety.cpp146 if (const auto *DRE = dyn_cast<DeclRefExpr>(&E)) in get() local
147 return get(*DRE->getDecl()); in get()
174 if (const auto *DRE = dyn_cast<DeclRefExpr>(&E)) { in getOrCreate() local
176 return getOrCreate(*DRE->getDecl()); in getOrCreate()
417 if (const auto *DRE = dyn_cast<DeclRefExpr>(SubExpr)) { in VisitUnaryOperator() local
418 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in VisitUnaryOperator()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DScopeInfo.cpp142 const DeclRefExpr *DRE) in WeakObjectProfileTy() argument
143 : Base(nullptr, true), Property(DRE->getDecl()) { in WeakObjectProfileTy()
195 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse() local
196 if (isa<VarDecl>(DRE->getDecl())) in markSafeWeakUse()
197 Uses = WeakObjectUses.find(WeakObjectProfileTy(DRE)); in markSafeWeakUse()
238 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures() local
239 Callback(cast<ValueDecl>(DRE->getFoundDecl()), E); in visitPotentialCaptures()
H A DSemaSYCL.cpp388 ExprResult TransformDeclRefExpr(DeclRefExpr *DRE) { in TransformDeclRefExpr() argument
389 const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()); in TransformDeclRefExpr()
400 SemaRef.getASTContext(), DRE->getQualifierLoc(), in TransformDeclRefExpr()
401 DRE->getTemplateKeywordLoc(), VD, false, DRE->getNameInfo(), in TransformDeclRefExpr()
402 DRE->getType(), DRE->getValueKind()); in TransformDeclRefExpr()
405 return DRE; in TransformDeclRefExpr()
H A DCheckExprLifetime.cpp771 auto *DRE = cast<DeclRefExpr>(Init); in visitLocalsRetainedByReferenceBinding() local
772 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding()
774 !DRE->refersToEnclosingVariableOrCapture()) { in visitLocalsRetainedByReferenceBinding()
776 Visit(Path, Local(DRE), RK); in visitLocalsRetainedByReferenceBinding()
777 } else if (isa<ParmVarDecl>(DRE->getDecl())) { in visitLocalsRetainedByReferenceBinding()
782 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding()
871 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) { in visitLocalsRetainedByInitializer() local
872 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByInitializer()
875 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByInitializer()
1454 auto *DRE = dyn_cast<DeclRefExpr>(L); in checkExprLifetimeImpl() local
[all …]
H A DSemaBoundsSafety.cpp173 auto *DRE = dyn_cast<DeclRefExpr>(E); in CheckCountedByAttrOnField() local
174 if (!DRE) { in CheckCountedByAttrOnField()
181 auto *CountDecl = DRE->getDecl(); in CheckCountedByAttrOnField()
H A DSemaOpenACC.cpp563 if (const auto *DRE = dyn_cast<DeclRefExpr>(CurVarExpr)) { in ActOnCacheVar() local
565 DRE->getFoundDecl()->getCanonicalDecl())) in ActOnCacheVar()
660 if (const auto *DRE = dyn_cast<DeclRefExpr>(CurVarExpr)) { in ActOnVar() local
662 DRE->getFoundDecl()->getCanonicalDecl())) in ActOnVar()
1133 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in getDeclFromExpr() local
1134 return dyn_cast<ValueDecl>(DRE->getDecl()); in getDeclFromExpr()
1219 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) in checkForInit() local
1220 InitVar = DRE->getDecl(); in checkForInit()
1243 if (auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in checkForInit() local
1244 InitVar = DRE->getDecl(); in checkForInit()
[all …]
H A DSemaAvailability.cpp782 bool VisitDeclRefExpr(DeclRefExpr *DRE) override { in VisitDeclRefExpr() argument
783 if (DRE->getDecl() == D) in VisitDeclRefExpr()
856 bool VisitDeclRefExpr(DeclRefExpr *DRE) override { in VisitDeclRefExpr() argument
857 DiagnoseDeclAvailability(DRE->getDecl(), in VisitDeclRefExpr()
858 SourceRange(DRE->getBeginLoc(), DRE->getEndLoc())); in VisitDeclRefExpr()
H A DSemaExpr.cpp520 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in DefaultFunctionArrayConversion() local
521 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl())) in DefaultFunctionArrayConversion()
2321 auto *DRE = dyn_cast<DeclRefExpr>(VD->getInit()); in isCapturingReferenceToHostVarInCUDADeviceLambda() local
2322 if (!DRE) in isCapturingReferenceToHostVarInCUDADeviceLambda()
2324 auto *Referee = dyn_cast<VarDecl>(DRE->getDecl()); in isCapturingReferenceToHostVarInCUDADeviceLambda()
4398 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Inner)) { in CheckAlignOfExpr() local
4399 D = DRE->getDecl(); in CheckAlignOfExpr()
5872 if (auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) { in isParenthetizedAndQualifiedAddressOfExpr() local
5873 return DRE->hasQualifier(); in isParenthetizedAndQualifiedAddressOfExpr()
6490 const DeclRefExpr *DRE = dyn_cast_if_present<DeclRefExpr>(E); in DiagnosedUnqualifiedCallsToStdFunctions() local
[all …]
H A DSemaStmtAsm.cpp140 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in CheckNakedParmReference() local
141 if (isa<ParmVarDecl>(DRE->getDecl())) { in CheckNakedParmReference()
142 S.Diag(DRE->getBeginLoc(), diag::err_asm_naked_parm_ref); in CheckNakedParmReference()
798 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo() local
799 if (DRE->getDecl()->getKind() == Decl::EnumConstant) in FillInlineAsmIdentifierInfo()
H A DSemaARM.cpp867 DeclRefExpr *DRE = in CheckARMBuiltinExclusiveCall() local
887 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer) in CheckARMBuiltinExclusiveCall()
904 Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) in CheckARMBuiltinExclusiveCall()
921 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intfltptr) in CheckARMBuiltinExclusiveCall()
929 Diag(DRE->getBeginLoc(), diag::err_atomic_exclusive_builtin_pointer_size) in CheckARMBuiltinExclusiveCall()
943 Diag(DRE->getBeginLoc(), diag::err_arc_atomic_ownership) in CheckARMBuiltinExclusiveCall()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DRawPtrRefLambdaCapturesChecker.cpp111 bool VisitDeclRefExpr(DeclRefExpr *DRE) override { in checkASTDecl()
112 if (DeclRefExprsToIgnore.contains(DRE)) in checkASTDecl()
114 auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl()); in checkASTDecl()
225 auto *DRE = dyn_cast<DeclRefExpr>(CtorArg); in checkASTDecl() local
226 if (!DRE) in checkASTDecl()
228 auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl()); in checkASTDecl()
249 auto *DRE = dyn_cast<DeclRefExpr>(Callee->IgnoreParenCasts()); in checkASTDecl() local
250 if (!DRE) in checkASTDecl()
252 auto *MD = dyn_cast_or_null<CXXMethodDecl>(DRE->getDecl()); in checkASTDecl()
355 if (auto *DRE = dyn_cast<DeclRefExpr>(Arg)) { in checkASTDecl() local
[all …]
H A DRetainPtrCtorAdoptChecker.cpp185 if (auto *DRE = dyn_cast<DeclRefExpr>(Arg)) { in checkAdoptCall() local
186 if (CreateOrCopyOutArguments.contains(DRE->getDecl())) in checkAdoptCall()
244 auto *DRE = dyn_cast<DeclRefExpr>(SubExpr->IgnoreParenCasts()); in checkCreateOrCopyFunction() local
245 if (!DRE) in checkCreateOrCopyFunction()
247 auto *Decl = DRE->getDecl(); in checkCreateOrCopyFunction()
491 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in isOwned() local
492 auto QT = DRE->getType(); in isOwned()
H A DASTUtils.cpp31 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in tryToFindPtrOrigin() local
32 if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) { in tryToFindPtrOrigin()
H A DForwardDeclChecker.cpp278 if (auto *DRE = dyn_cast<DeclRefExpr>(ArgExpr)) { in visitCallArg() local
279 if (auto *ValDecl = DRE->getDecl()) { in visitCallArg()
/freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/
H A DUnsafeBufferUsageGadgets.def43 FIXABLE_GADGET(ULCArraySubscript) // `DRE[any]` in an Unspecified Lvalue Context
46 FIXABLE_GADGET(UPCAddressofArraySubscript) // '&DRE[any]' in an Unspecified Pointer Context
/freebsd/contrib/llvm-project/clang/lib/Frontend/Rewrite/
H A DRewriteObjC.cpp317 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
2018 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local
2025 DRE, nullptr, VK_PRValue, FPOptionsOverride()); in SynthesizeCallToFunctionDecl()
2515 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local
2518 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral()
2519 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral()
2703 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
2707 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
2795 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
2799 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
[all …]
H A DRewriteModernObjC.cpp390 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
2102 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local
2109 DRE, nullptr, VK_PRValue, FPOptionsOverride()); in SynthesizeCallToFunctionDecl()
2589 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local
2592 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral()
2593 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral()
2678 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCBoxedExpr() local
2682 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCBoxedExpr()
2799 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCArrayLiteralExpr() local
2803 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCArrayLiteralExpr()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DCastValueChecker.cpp122 if (const auto *DRE = dyn_cast<DeclRefExpr>(Object)) { in getNoteTag() local
123 Out << '\'' << DRE->getDecl()->getDeclName() << '\''; in getNoteTag()
153 if (const auto *DRE = dyn_cast<DeclRefExpr>(Object)) { in getNoteTag() local
154 Out << '\'' << DRE->getDecl()->getNameAsString() << '\''; in getNoteTag()
H A DDereferenceChecker.cpp156 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference() local
157 return DRE->getDecl()->getType()->isReferenceType(); in isDeclRefExprToReference()
H A DDeadStoresChecker.cpp416 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in observeStmt() local
417 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp102 DeclRefExpr DRE( in OMPLexicalScope() local
107 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress()); in OMPLexicalScope()
301 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope() local
307 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress()); in OMPSimdLexicalScope()
354 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue() local
356 return EmitLValue(&DRE); in EmitOMPSharedLValue()
917 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), in EmitOMPFirstprivateClause() local
923 ConstantEmission CE = tryEmitAsConstant(&DRE); in EmitOMPFirstprivateClause()
931 OriginalLVal = CE.getReferenceLValue(*this, &DRE); in EmitOMPFirstprivateClause()
934 OriginalLVal = EmitLValue(&DRE); in EmitOMPFirstprivateClause()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DExpr.cpp214 else if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isFlexibleArrayMemberLike() local
215 D = DRE->getDecl(); in isFlexibleArrayMemberLike()
1552 if (auto *DRE = dyn_cast<DeclRefExpr>(CEE)) in getReferencedDeclOfCallee() local
1553 return DRE->getDecl(); in getReferencedDeclOfCallee()
1580 if (auto *DRE = dyn_cast<DeclRefExpr>(CEE)) in getReferencedDeclOfCallee() local
1581 return DRE->getDecl(); in getReferencedDeclOfCallee()
2926 if (auto *DRE = dyn_cast<DeclRefExpr>(SubE)) in isUnusedResultAWarning() local
2927 if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in isUnusedResultAWarning()
4114 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E); in isObjCSelfExpr() local
4115 if (!DRE) in isObjCSelfExpr()
[all …]

1234