| /freebsd-13-stable/contrib/llvm-project/clang/lib/ARCMigrate/ |
| HD | TransGCCalls.cpp | 46 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) { in VisitCallExpr() local 47 if (FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(DRE->getDecl())) { in VisitCallExpr() 56 DRE->getSourceRange()); in VisitCallExpr() 57 TA.replace(DRE->getSourceRange(), "CFBridgingRelease"); in VisitCallExpr() 61 "receives in ARC", DRE->getLocation(), in VisitCallExpr() 62 DRE->getSourceRange()); in VisitCallExpr()
|
| HD | TransProtectedScope.cpp | 183 DeclRefExpr *DRE = LocalRefs[i]; in hasVarReferencedOutside() local 184 if (isInRange(DRE->getDecl()->getLocation(), info.Range) && in hasVarReferencedOutside() 185 !isInRange(DRE->getLocation(), info.Range)) in hasVarReferencedOutside()
|
| HD | Transforms.cpp | 198 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isGlobalVar() local 199 return DRE->getDecl()->getDeclContext()->isFileContext() && in isGlobalVar() 200 DRE->getDecl()->isExternallyVisible(); in isGlobalVar()
|
| HD | TransRetainReleaseDealloc.cpp | 305 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in getReferencedDecl() local 306 return DRE->getDecl(); in getReferencedDecl()
|
| HD | TransUnbridgedCasts.cpp | 452 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isSelf() local 453 if (ImplicitParamDecl *IPD = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) in isSelf()
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/Sema/ |
| HD | ScopeInfo.cpp | 143 const DeclRefExpr *DRE) in WeakObjectProfileTy() argument 144 : Base(nullptr, true), Property(DRE->getDecl()) { in WeakObjectProfileTy() 196 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse() local 197 if (isa<VarDecl>(DRE->getDecl())) in markSafeWeakUse() 198 Uses = WeakObjectUses.find(WeakObjectProfileTy(DRE)); in markSafeWeakUse() 239 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures() local 240 Callback(cast<ValueDecl>(DRE->getFoundDecl()), E); in visitPotentialCaptures()
|
| HD | CheckExprLifetime.cpp | 570 auto *DRE = cast<DeclRefExpr>(Init); in visitLocalsRetainedByReferenceBinding() local 571 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding() 573 !DRE->refersToEnclosingVariableOrCapture()) { in visitLocalsRetainedByReferenceBinding() 575 Visit(Path, Local(DRE), RK); in visitLocalsRetainedByReferenceBinding() 576 } else if (isa<ParmVarDecl>(DRE->getDecl())) { in visitLocalsRetainedByReferenceBinding() 581 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding() 676 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) { in visitLocalsRetainedByInitializer() local 677 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByInitializer() 680 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByInitializer() 1155 auto *DRE = dyn_cast<DeclRefExpr>(L); in checkExprLifetimeImpl() local [all …]
|
| HD | SemaBoundsSafety.cpp | 144 auto *DRE = dyn_cast<DeclRefExpr>(E); in CheckCountedByAttrOnField() local 145 if (!DRE) { in CheckCountedByAttrOnField() 152 auto *CountDecl = DRE->getDecl(); in CheckCountedByAttrOnField()
|
| HD | SemaAvailability.cpp | 739 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument 740 if (DRE->getDecl() == D) in VisitDeclRefExpr() 816 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument 817 DiagnoseDeclAvailability(DRE->getDecl(), in VisitDeclRefExpr() 818 SourceRange(DRE->getBeginLoc(), DRE->getEndLoc())); in VisitDeclRefExpr()
|
| HD | SemaExpr.cpp | 523 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in DefaultFunctionArrayConversion() local 524 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl())) in DefaultFunctionArrayConversion() 2214 auto *DRE = dyn_cast<DeclRefExpr>(VD->getInit()); in isCapturingReferenceToHostVarInCUDADeviceLambda() local 2215 if (!DRE) in isCapturingReferenceToHostVarInCUDADeviceLambda() 2217 auto *Referee = dyn_cast<VarDecl>(DRE->getDecl()); in isCapturingReferenceToHostVarInCUDADeviceLambda() 4319 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Inner)) { in CheckAlignOfExpr() local 4320 D = DRE->getDecl(); in CheckAlignOfExpr() 5745 if (auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) { in isParenthetizedAndQualifiedAddressOfExpr() local 5746 return DRE->hasQualifier(); in isParenthetizedAndQualifiedAddressOfExpr() 6348 const DeclRefExpr *DRE = dyn_cast_if_present<DeclRefExpr>(E); in DiagnosedUnqualifiedCallsToStdFunctions() local [all …]
|
| HD | SemaStmtAsm.cpp | 146 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in CheckNakedParmReference() local 147 if (isa<ParmVarDecl>(DRE->getDecl())) { in CheckNakedParmReference() 148 S.Diag(DRE->getBeginLoc(), diag::err_asm_naked_parm_ref); in CheckNakedParmReference() 758 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo() local 759 if (DRE->getDecl()->getKind() == Decl::EnumConstant) in FillInlineAsmIdentifierInfo()
|
| HD | SemaARM.cpp | 884 DeclRefExpr *DRE = in CheckARMBuiltinExclusiveCall() local 904 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer) in CheckARMBuiltinExclusiveCall() 921 Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) in CheckARMBuiltinExclusiveCall() 938 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intfltptr) in CheckARMBuiltinExclusiveCall() 946 Diag(DRE->getBeginLoc(), diag::err_atomic_exclusive_builtin_pointer_size) in CheckARMBuiltinExclusiveCall() 960 Diag(DRE->getBeginLoc(), diag::err_arc_atomic_ownership) in CheckARMBuiltinExclusiveCall()
|
| HD | SemaTemplate.cpp | 637 if (auto *DRE = dyn_cast<DeclRefExpr>(TemplateName.get())) { in diagnoseExprIntendedAsTemplateName() local 638 NameInfo = DRE->getNameInfo(); in diagnoseExprIntendedAsTemplateName() 639 SS.Adopt(DRE->getQualifierLoc()); in diagnoseExprIntendedAsTemplateName() 641 Found = DRE->getFoundDecl(); in diagnoseExprIntendedAsTemplateName() 3787 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg.getAsExpr()); in isTemplateArgumentTemplateParameter() local 3788 if (!DRE || !DRE->getDecl()) in isTemplateArgumentTemplateParameter() 3791 dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl()); in isTemplateArgumentTemplateParameter() 6184 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg)) in CheckTemplateArgumentAddressOfObjectOrFunction() local 6185 Entity = DRE->getDecl(); in CheckTemplateArgumentAddressOfObjectOrFunction() 6371 DeclRefExpr *DRE = nullptr; in CheckTemplateArgumentPointerToMember() local [all …]
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/Analysis/ |
| HD | UninitializedValues.cpp | 267 if (const auto *DRE = in findVar() local 269 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() 271 return FindVarResult(VD, DRE); in findVar() 312 Class get(const DeclRefExpr *DRE) const { in get() 314 = Classification.find(DRE); in get() 318 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() 332 const auto *DRE = in getSelfInitExpr() local 334 if (DRE && DRE->getDecl() == VD) in getSelfInitExpr() 335 return DRE; in getSelfInitExpr() 382 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify() local [all …]
|
| HD | UnsafeBufferUsage.cpp | 57 static std::string getDREAncestorString(const DeclRefExpr *DRE, in getDREAncestorString() argument 60 const Stmt *St = DRE; in getDREAncestorString() 590 if (const auto *DRE = in getClaimedVarUseSites() local 592 Uses.push_back(DRE); in getClaimedVarUseSites() 629 if (const auto *DRE = in getClaimedVarUseSites() local 631 return {DRE}; in getClaimedVarUseSites() 675 if (const auto *DRE = in getClaimedVarUseSites() local 677 return {DRE}; in getClaimedVarUseSites() 728 if (const auto *DRE = dyn_cast<DeclRefExpr>(Ptr->IgnoreParenImpCasts())) { in getClaimedVarUseSites() local 729 return {DRE}; in getClaimedVarUseSites() [all …]
|
| HD | ThreadSafetyCommon.cpp | 308 til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, in translateDeclRefExpr() argument 310 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr() 487 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator() local 488 if (DRE->getDecl()->isCXXInstanceMember()) { in translateUnaryOperator() 492 return new (Arena) til::Project(W, DRE->getDecl()); in translateUnaryOperator() 546 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in translateBinAssign() local 547 VD = DRE->getDecl(); in translateBinAssign() 612 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { in translateCastExpr() local 613 til::SExpr *E0 = lookupVarDecl(DRE->getDecl()); in translateCastExpr()
|
| /freebsd-13-stable/contrib/llvm-project/clang/include/clang/Analysis/Analyses/ |
| HD | UnsafeBufferUsageGadgets.def | 42 FIXABLE_GADGET(ULCArraySubscript) // `DRE[any]` in an Unspecified Lvalue Context 45 FIXABLE_GADGET(UPCAddressofArraySubscript) // '&DRE[any]' in an Unspecified Pointer Context
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/Frontend/Rewrite/ |
| HD | RewriteObjC.cpp | 319 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE); 2020 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local 2027 DRE, nullptr, VK_PRValue, FPOptionsOverride()); in SynthesizeCallToFunctionDecl() 2517 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local 2520 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral() 2521 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral() 2705 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local 2709 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr() 2797 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local 2801 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr() [all …]
|
| HD | RewriteModernObjC.cpp | 391 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE); 2103 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local 2110 DRE, nullptr, VK_PRValue, FPOptionsOverride()); in SynthesizeCallToFunctionDecl() 2590 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local 2593 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral() 2594 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral() 2679 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCBoxedExpr() local 2683 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCBoxedExpr() 2800 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCArrayLiteralExpr() local 2804 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCArrayLiteralExpr() [all …]
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| HD | CastValueChecker.cpp | 122 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()
|
| HD | DereferenceChecker.cpp | 151 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference() local 152 return DRE->getDecl()->getType()->isReferenceType(); in isDeclRefExprToReference()
|
| HD | DeadStoresChecker.cpp | 417 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in observeStmt() local 418 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt()
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/CodeGen/ |
| HD | CGStmtOpenMP.cpp | 98 DeclRefExpr DRE( in OMPLexicalScope() local 103 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress()); in OMPLexicalScope() 295 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope() local 301 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress()); in OMPSimdLexicalScope() 324 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue() local 326 return EmitLValue(&DRE); in EmitOMPSharedLValue() 879 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), in EmitOMPFirstprivateClause() local 885 ConstantEmission CE = tryEmitAsConstant(&DRE); in EmitOMPFirstprivateClause() 893 OriginalLVal = CE.getReferenceLValue(*this, &DRE); in EmitOMPFirstprivateClause() 896 OriginalLVal = EmitLValue(&DRE); in EmitOMPFirstprivateClause() [all …]
|
| /freebsd-13-stable/contrib/llvm-project/clang/lib/AST/ |
| HD | Expr.cpp | 215 else if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isFlexibleArrayMemberLike() local 216 D = DRE->getDecl(); in isFlexibleArrayMemberLike() 1568 if (auto *DRE = dyn_cast<DeclRefExpr>(CEE)) in getReferencedDeclOfCallee() local 1569 return DRE->getDecl(); in getReferencedDeclOfCallee() 2909 if (auto *DRE = dyn_cast<DeclRefExpr>(SubE)) in isUnusedResultAWarning() local 2910 if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in isUnusedResultAWarning() 4087 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E); in isObjCSelfExpr() local 4088 if (!DRE) in isObjCSelfExpr() 4091 const ImplicitParamDecl *Param = dyn_cast<ImplicitParamDecl>(DRE->getDecl()); in isObjCSelfExpr() 4151 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) in getEnumConstantDecl() local [all …]
|
| HD | JSONNodeDumper.cpp | 1333 void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) { in VisitDeclRefExpr() argument 1334 JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl())); in VisitDeclRefExpr() 1335 if (DRE->getDecl() != DRE->getFoundDecl()) in VisitDeclRefExpr() 1337 createBareDeclRef(DRE->getFoundDecl())); in VisitDeclRefExpr() 1338 switch (DRE->isNonOdrUse()) { in VisitDeclRefExpr() 1344 attributeOnlyIfTrue("isImmediateEscalating", DRE->isImmediateEscalating()); in VisitDeclRefExpr()
|