Home
last modified time | relevance | path

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

123

/openbsd/src/gnu/llvm/clang/lib/Analysis/
DUnsafeBufferUsage.cpp239 if (const auto *DRE = in getClaimedVarUseSites() local
241 Uses.push_back(DRE); in getClaimedVarUseSites()
273 if (const auto *DRE = in getClaimedVarUseSites() local
275 return {DRE}; in getClaimedVarUseSites()
312 if (const auto *DRE = in getClaimedVarUseSites() local
314 return {DRE}; in getClaimedVarUseSites()
359 if (const auto *DRE = in getClaimedVarUseSites() local
361 return {DRE}; in getClaimedVarUseSites()
390 void discoverUse(const DeclRefExpr *DRE) { Uses->insert(DRE); } in discoverUse() argument
393 void claimUse(const DeclRefExpr *DRE) { in claimUse() argument
[all …]
DUninitializedValues.cpp249 if (const auto *DRE = in findVar() local
251 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar()
253 return FindVarResult(VD, DRE); in findVar()
294 Class get(const DeclRefExpr *DRE) const { in get()
296 = Classification.find(DRE); in get()
300 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get()
314 const auto *DRE = in getSelfInitExpr() local
316 if (DRE && DRE->getDecl() == VD) in getSelfInitExpr()
317 return DRE; in getSelfInitExpr()
364 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify() local
[all …]
DThreadSafetyCommon.cpp306 til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, in translateDeclRefExpr() argument
308 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr()
479 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator() local
480 if (DRE->getDecl()->isCXXInstanceMember()) { in translateUnaryOperator()
484 return new (Arena) til::Project(W, DRE->getDecl()); in translateUnaryOperator()
538 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in translateBinAssign() local
539 VD = DRE->getDecl(); in translateBinAssign()
604 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { in translateCastExpr() local
605 til::SExpr *E0 = lookupVarDecl(DRE->getDecl()); in translateCastExpr()
/openbsd/src/gnu/llvm/clang/lib/ARCMigrate/
DTransGCCalls.cpp46 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()
DTransProtectedScope.cpp183 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()
DTransforms.cpp197 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isGlobalVar() local
198 return DRE->getDecl()->getDeclContext()->isFileContext() && in isGlobalVar()
199 DRE->getDecl()->isExternallyVisible(); in isGlobalVar()
DTransRetainReleaseDealloc.cpp305 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in getReferencedDecl() local
306 return DRE->getDecl(); in getReferencedDecl()
DTransUnbridgedCasts.cpp452 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isSelf() local
453 if (ImplicitParamDecl *IPD = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) in isSelf()
/openbsd/src/gnu/llvm/clang/lib/Sema/
DScopeInfo.cpp141 const DeclRefExpr *DRE) in WeakObjectProfileTy() argument
142 : Base(nullptr, true), Property(DRE->getDecl()) { in WeakObjectProfileTy()
194 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse() local
195 if (isa<VarDecl>(DRE->getDecl())) in markSafeWeakUse()
196 Uses = WeakObjectUses.find(WeakObjectProfileTy(DRE)); in markSafeWeakUse()
237 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures() local
238 Callback(cast<ValueDecl>(DRE->getFoundDecl()), E); in visitPotentialCaptures()
DSemaAvailability.cpp627 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
628 if (DRE->getDecl() == D) in VisitDeclRefExpr()
704 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
705 DiagnoseDeclAvailability(DRE->getDecl(), in VisitDeclRefExpr()
706 SourceRange(DRE->getBeginLoc(), DRE->getEndLoc())); in VisitDeclRefExpr()
DSemaStmtAsm.cpp145 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in CheckNakedParmReference() local
146 if (isa<ParmVarDecl>(DRE->getDecl())) { in CheckNakedParmReference()
147 S.Diag(DRE->getBeginLoc(), diag::err_asm_naked_parm_ref); in CheckNakedParmReference()
756 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo() local
757 if (DRE->getDecl()->getKind() == Decl::EnumConstant) in FillInlineAsmIdentifierInfo()
DSemaExpr.cpp518 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in DefaultFunctionArrayConversion() local
519 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl())) in DefaultFunctionArrayConversion()
2029 auto *DRE = dyn_cast<DeclRefExpr>(VD->getInit()); in isCapturingReferenceToHostVarInCUDADeviceLambda() local
2030 if (!DRE) in isCapturingReferenceToHostVarInCUDADeviceLambda()
2032 auto *Referee = dyn_cast<VarDecl>(DRE->getDecl()); in isCapturingReferenceToHostVarInCUDADeviceLambda()
4432 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Inner)) { in CheckAlignOfExpr() local
4433 D = DRE->getDecl(); in CheckAlignOfExpr()
6825 DeclRefExpr *DRE = dyn_cast_or_null<DeclRefExpr>(E); in DiagnosedUnqualifiedCallsToStdFunctions() local
6826 if (!DRE || !DRE->getLocation().isValid()) in DiagnosedUnqualifiedCallsToStdFunctions()
6829 if (DRE->getQualifier()) in DiagnosedUnqualifiedCallsToStdFunctions()
[all …]
DSemaTemplate.cpp637 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()
4306 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg.getAsExpr()); in isTemplateArgumentTemplateParameter() local
4307 if (!DRE || !DRE->getDecl()) in isTemplateArgumentTemplateParameter()
4310 dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl()); in isTemplateArgumentTemplateParameter()
6731 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg)) in CheckTemplateArgumentAddressOfObjectOrFunction() local
6732 Entity = DRE->getDecl(); in CheckTemplateArgumentAddressOfObjectOrFunction()
6918 DeclRefExpr *DRE = nullptr; in CheckTemplateArgumentPointerToMember() local
[all …]
DSemaInit.cpp5955 auto *DRE = dyn_cast<DeclRefExpr>(E); in isExprAnUnaddressableFunction() local
5956 if (!DRE || !isa<FunctionDecl>(DRE->getDecl())) in isExprAnUnaddressableFunction()
5960 cast<FunctionDecl>(DRE->getDecl())); in isExprAnUnaddressableFunction()
7527 auto *DRE = cast<DeclRefExpr>(Init); in visitLocalsRetainedByReferenceBinding() local
7528 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding()
7530 !DRE->refersToEnclosingVariableOrCapture()) { in visitLocalsRetainedByReferenceBinding()
7532 Visit(Path, Local(DRE), RK); in visitLocalsRetainedByReferenceBinding()
7533 } else if (isa<ParmVarDecl>(DRE->getDecl())) { in visitLocalsRetainedByReferenceBinding()
7538 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding()
7624 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) { in visitLocalsRetainedByInitializer() local
[all …]
DAnalysisBasedWarnings.cpp204 if (const DeclRefExpr *DRE = in hasRecursiveCallInPath() local
206 if (NestedNameSpecifier *NNS = DRE->getQualifier()) { in hasRecursiveCallInPath()
998 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Use.getUser())) { in DiagnoseUninitializedUse() local
1011 if (!alwaysReportSelfInit && DRE == Initializer->IgnoreParenImpCasts()) in DiagnoseUninitializedUse()
1014 ContainsReference CR(S.Context, DRE); in DiagnoseUninitializedUse()
1017 S.Diag(DRE->getBeginLoc(), diag::warn_uninit_self_reference_in_init) in DiagnoseUninitializedUse()
1018 << VD->getDeclName() << VD->getLocation() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
/openbsd/src/gnu/llvm/clang/lib/Frontend/Rewrite/
DRewriteObjC.cpp319 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 …]
DRewriteModernObjC.cpp392 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
2104 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local
2111 DRE, nullptr, VK_PRValue, FPOptionsOverride()); in SynthesizeCallToFunctionDecl()
2591 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local
2594 const_cast<ASTContext &>(*Context), DRE, UO_AddrOf, in RewriteObjCStringLiteral()
2595 Context->getPointerType(DRE->getType()), VK_PRValue, OK_Ordinary, in RewriteObjCStringLiteral()
2680 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCBoxedExpr() local
2684 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCBoxedExpr()
2801 DeclRefExpr *DRE = new (Context) DeclRefExpr( in RewriteObjCArrayLiteralExpr() local
2805 Context, Context->getPointerType(Context->VoidTy), CK_BitCast, DRE); in RewriteObjCArrayLiteralExpr()
[all …]
/openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Checkers/
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()
DDereferenceChecker.cpp149 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference() local
150 return DRE->getDecl()->getType()->isReferenceType(); in isDeclRefExprToReference()
DDeadStoresChecker.cpp417 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in observeStmt() local
418 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt()
DMacOSKeychainAPIChecker.cpp162 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in REGISTER_MAP_WITH_PROGRAMSTATE() local
163 const ValueDecl *VD = DRE->getDecl(); in REGISTER_MAP_WITH_PROGRAMSTATE()
/openbsd/src/gnu/llvm/clang/lib/CodeGen/
DCGStmtOpenMP.cpp94 DeclRefExpr DRE( in OMPLexicalScope() local
99 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress(CGF)); in OMPLexicalScope()
269 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope() local
275 InlinedShareds.addPrivate(VD, CGF.EmitLValue(&DRE).getAddress(CGF)); in OMPSimdLexicalScope()
298 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue() local
300 return EmitLValue(&DRE); in EmitOMPSharedLValue()
855 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), in EmitOMPFirstprivateClause() local
861 ConstantEmission CE = tryEmitAsConstant(&DRE); in EmitOMPFirstprivateClause()
869 OriginalLVal = CE.getReferenceLValue(*this, &DRE); in EmitOMPFirstprivateClause()
872 OriginalLVal = EmitLValue(&DRE); in EmitOMPFirstprivateClause()
[all …]
/openbsd/src/gnu/llvm/clang/lib/AST/
DExpr.cpp238 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isFlexibleArrayMemberLike() local
239 ND = DRE->getDecl(); in isFlexibleArrayMemberLike()
1554 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(CEE)) in getReferencedDeclOfCallee() local
1555 return DRE->getDecl(); in getReferencedDeclOfCallee()
2879 if (auto *DRE = dyn_cast<DeclRefExpr>(SubE)) in isUnusedResultAWarning() local
2880 if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in isUnusedResultAWarning()
4013 const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E); in isObjCSelfExpr() local
4014 if (!DRE) in isObjCSelfExpr()
4017 const ImplicitParamDecl *Param = dyn_cast<ImplicitParamDecl>(DRE->getDecl()); in isObjCSelfExpr()
4092 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) in refersToVectorElement() local
[all …]
DJSONNodeDumper.cpp1232 void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
1233 JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl())); in VisitDeclRefExpr()
1234 if (DRE->getDecl() != DRE->getFoundDecl()) in VisitDeclRefExpr()
1236 createBareDeclRef(DRE->getFoundDecl())); in VisitDeclRefExpr()
1237 switch (DRE->isNonOdrUse()) { in VisitDeclRefExpr()
/openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Core/
DBugReporterVisitors.cpp220 if (const auto *DRE = dyn_cast<DeclRefExpr>(CondVarExpr)) in getSValForVar() local
221 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in getSValForVar()
607 if (const auto *DRE = dyn_cast<DeclRefExpr>(Base)) in potentiallyWritesIntoIvar() local
608 if (const auto *ID = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) in potentiallyWritesIntoIvar()
3158 const Expr *Cond, const DeclRefExpr *DRE, BugReporterContext &BRC, in VisitTrueTest() argument
3161 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in VisitTrueTest()
3170 if (!printValue(DRE, Out, N, TookTrue, IsAssuming)) in VisitTrueTest()
3175 if (isVarAnInterestingCondition(DRE, N, &report)) in VisitTrueTest()
3180 PathDiagnosticLocation Loc(DRE, BRC.getSourceManager(), LCtx); in VisitTrueTest()
3187 if (isInterestingExpr(DRE, N, &report)) in VisitTrueTest()

123