Home
last modified time | relevance | path

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

123

/netbsd-src/external/apache2/llvm/dist/clang/lib/ARCMigrate/
H A 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()
H A 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()
H A DTransforms.cpp199 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isGlobalVar() local
200 return DRE->getDecl()->getDeclContext()->isFileContext() && in isGlobalVar()
201 DRE->getDecl()->isExternallyVisible(); in isGlobalVar()
H A DTransRetainReleaseDealloc.cpp305 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in getReferencedDecl() local
306 return DRE->getDecl(); in getReferencedDecl()
H A DTransUnbridgedCasts.cpp452 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) in isSelf() local
453 if (ImplicitParamDecl *IPD = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) in isSelf()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Sema/
H A DScopeInfo.cpp140 const DeclRefExpr *DRE) in WeakObjectProfileTy() argument
141 : Base(nullptr, true), Property(DRE->getDecl()) { in WeakObjectProfileTy()
193 else if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in markSafeWeakUse() local
194 if (isa<VarDecl>(DRE->getDecl())) in markSafeWeakUse()
195 Uses = WeakObjectUses.find(WeakObjectProfileTy(DRE)); in markSafeWeakUse()
236 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { in visitPotentialCaptures() local
237 Callback(cast<VarDecl>(DRE->getFoundDecl()), E); in visitPotentialCaptures()
H A DSemaAvailability.cpp623 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
624 if (DRE->getDecl() == D) in VisitDeclRefExpr()
714 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
715 DiagnoseDeclAvailability(DRE->getDecl(), in VisitDeclRefExpr()
716 SourceRange(DRE->getBeginLoc(), DRE->getEndLoc())); in VisitDeclRefExpr()
H A DSemaStmtAsm.cpp144 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) { in CheckNakedParmReference() local
145 if (isa<ParmVarDecl>(DRE->getDecl())) { in CheckNakedParmReference()
146 S.Diag(DRE->getBeginLoc(), diag::err_asm_naked_parm_ref); in CheckNakedParmReference()
740 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo() local
741 if (DRE->getDecl()->getKind() == Decl::EnumConstant) in FillInlineAsmIdentifierInfo()
H A DSemaExpr.cpp498 if (auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreParenCasts())) in DefaultFunctionArrayConversion() local
499 if (auto *FD = dyn_cast<FunctionDecl>(DRE->getDecl())) in DefaultFunctionArrayConversion()
1961 auto *DRE = dyn_cast<DeclRefExpr>(VD->getInit()); in isCapturingReferenceToHostVarInCUDADeviceLambda() local
1962 if (!DRE) in isCapturingReferenceToHostVarInCUDADeviceLambda()
1964 auto *Referee = dyn_cast<VarDecl>(DRE->getDecl()); in isCapturingReferenceToHostVarInCUDADeviceLambda()
4284 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Inner)) { in CheckAlignOfExpr() local
4285 D = DRE->getDecl(); in CheckAlignOfExpr()
6480 if (auto *DRE = dyn_cast<DeclRefExpr>(NakedFn)) { in BuildCallExpr() local
6481 NDecl = DRE->getDecl(); in BuildCallExpr()
6494 nullptr, DRE->isNonOdrUse()); in BuildCallExpr()
[all …]
H A DSemaTemplate.cpp632 if (auto *DRE = dyn_cast<DeclRefExpr>(TemplateName.get())) { in diagnoseExprIntendedAsTemplateName() local
633 NameInfo = DRE->getNameInfo(); in diagnoseExprIntendedAsTemplateName()
634 SS.Adopt(DRE->getQualifierLoc()); in diagnoseExprIntendedAsTemplateName()
636 Found = DRE->getFoundDecl(); in diagnoseExprIntendedAsTemplateName()
4131 DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg.getAsExpr()); in isTemplateArgumentTemplateParameter() local
4132 if (!DRE || !DRE->getDecl()) in isTemplateArgumentTemplateParameter()
4135 dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl()); in isTemplateArgumentTemplateParameter()
6497 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Arg)) in CheckTemplateArgumentAddressOfObjectOrFunction() local
6498 Entity = DRE->getDecl(); in CheckTemplateArgumentAddressOfObjectOrFunction()
6677 DeclRefExpr *DRE = nullptr; in CheckTemplateArgumentPointerToMember() local
[all …]
H A DSemaChecking.cpp792 auto *DRE = cast<DeclRefExpr>(TheCall->getCallee()->IgnoreParenCasts()); in SemaBuiltinSEHScopeCheck() local
794 << DRE->getDecl()->getIdentifier(); in SemaBuiltinSEHScopeCheck()
1974 auto *DRE = dyn_cast<DeclRefExpr>(TheCall->getArg(0)->IgnoreImpCasts()); in CheckBuiltinFunctionCall() local
1975 if (!DRE) in CheckBuiltinFunctionCall()
1977 auto *D = DRE->getDecl(); in CheckBuiltinFunctionCall()
2339 DeclRefExpr *DRE =cast<DeclRefExpr>(TheCall->getCallee()->IgnoreParenCasts()); in CheckARMBuiltinExclusiveCall() local
2357 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer) in CheckARMBuiltinExclusiveCall()
2374 Diag(DRE->getBeginLoc(), diag::ext_typecheck_convert_discards_qualifiers) in CheckARMBuiltinExclusiveCall()
2391 Diag(DRE->getBeginLoc(), diag::err_atomic_builtin_must_be_pointer_intfltptr) in CheckARMBuiltinExclusiveCall()
2399 Diag(DRE->getBeginLoc(), diag::err_atomic_exclusive_builtin_pointer_size) in CheckARMBuiltinExclusiveCall()
[all …]
H A DSemaInit.cpp5648 auto *DRE = dyn_cast<DeclRefExpr>(E); in isExprAnUnaddressableFunction() local
5649 if (!DRE || !isa<FunctionDecl>(DRE->getDecl())) in isExprAnUnaddressableFunction()
5653 cast<FunctionDecl>(DRE->getDecl())); in isExprAnUnaddressableFunction()
7138 auto *DRE = cast<DeclRefExpr>(Init); in visitLocalsRetainedByReferenceBinding() local
7139 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding()
7141 !DRE->refersToEnclosingVariableOrCapture()) { in visitLocalsRetainedByReferenceBinding()
7143 Visit(Path, Local(DRE), RK); in visitLocalsRetainedByReferenceBinding()
7144 } else if (isa<ParmVarDecl>(DRE->getDecl())) { in visitLocalsRetainedByReferenceBinding()
7149 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding()
7235 if (auto *DRE = dyn_cast<DeclRefExpr>(L)) { in visitLocalsRetainedByInitializer() local
[all …]
H A DSemaOpenMP.cpp2628 auto *DRE = cast<DeclRefExpr>(DE->IgnoreParens()); in EndOpenMPDSABlock() local
2629 auto *VD = cast<VarDecl>(DRE->getDecl()); in EndOpenMPDSABlock()
2641 VD->getName(), VD->hasAttrs() ? &VD->getAttrs() : nullptr, DRE); in EndOpenMPDSABlock()
2685 auto *DRE = dyn_cast<DeclRefExpr>(D.Allocator->IgnoreParenImpCasts()); in EndOpenMPDSABlock() local
2686 if (!DRE) in EndOpenMPDSABlock()
2688 ValueDecl *VD = DRE->getDecl(); in EndOpenMPDSABlock()
3836 DeclRefExpr *DRE = buildDeclRefExpr( in visitSubCaptures() local
3839 Visit(DRE); in visitSubCaptures()
6366 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in ActOnOpenMPDeclareSimdDirective() local
6367 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) in ActOnOpenMPDeclareSimdDirective()
[all …]
H A DAnalysisBasedWarnings.cpp200 if (const DeclRefExpr *DRE = in hasRecursiveCallInPath() local
202 if (NestedNameSpecifier *NNS = DRE->getQualifier()) { in hasRecursiveCallInPath()
995 if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Use.getUser())) { in DiagnoseUninitializedUse() local
1008 if (!alwaysReportSelfInit && DRE == Initializer->IgnoreParenImpCasts()) in DiagnoseUninitializedUse()
1011 ContainsReference CR(S.Context, DRE); in DiagnoseUninitializedUse()
1014 S.Diag(DRE->getBeginLoc(), diag::warn_uninit_self_reference_in_init) in DiagnoseUninitializedUse()
1015 << VD->getDeclName() << VD->getLocation() << DRE->getSourceRange(); in DiagnoseUninitializedUse()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Analysis/
H A DUninitializedValues.cpp252 if (const auto *DRE = in findVar() local
254 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar()
256 return FindVarResult(VD, DRE); in findVar()
297 Class get(const DeclRefExpr *DRE) const { in get()
299 = Classification.find(DRE); in get()
303 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get()
317 const auto *DRE = in getSelfInitExpr() local
319 if (DRE && DRE->getDecl() == VD) in getSelfInitExpr()
320 return DRE; in getSelfInitExpr()
367 if (const DeclRefExpr *DRE = Var.getDeclRefExpr()) in classify() local
[all …]
H A DThreadSafetyCommon.cpp272 til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, in translateDeclRefExpr() argument
274 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr()
441 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator() local
442 if (DRE->getDecl()->isCXXInstanceMember()) { in translateUnaryOperator()
446 return new (Arena) til::Project(W, DRE->getDecl()); in translateUnaryOperator()
500 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in translateBinAssign() local
501 VD = DRE->getDecl(); in translateBinAssign()
566 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { in translateCastExpr() local
567 til::SExpr *E0 = lookupVarDecl(DRE->getDecl()); in translateCastExpr()
H A DThreadSafety.cpp639 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSExp)) { in VisitBinaryOperator() local
640 const ValueDecl *VDec = DRE->getDecl(); in VisitBinaryOperator()
1456 else if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) { in getTrylockCallExpr() local
1457 const Expr *E = LocalVarMap.lookupExpr(DRE->getDecl(), C); in getTrylockCallExpr()
1720 while (const auto *DRE = dyn_cast<DeclRefExpr>(Exp)) { in checkAccess() local
1721 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()->getCanonicalDecl()); in checkAccess()
1961 DeclRefExpr DRE(VD->getASTContext(), VD, false, VD->getType(), VK_LValue, in handleCall() local
1964 CapabilityExpr Scp = Analyzer->SxBuilder.translateAttrExpr(&DRE, nullptr); in handleCall()
2494 DeclRefExpr DRE(VD->getASTContext(), VD, false, in runAnalysis() local
2497 LocksetBuilder.handleCall(&DRE, DD); in runAnalysis()
/netbsd-src/external/apache2/llvm/dist/clang/lib/Frontend/Rewrite/
H A DRewriteObjC.cpp319 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
2020 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local
2027 DRE, nullptr, VK_RValue, 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_RValue, OK_Ordinary, in RewriteObjCStringLiteral()
2710 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
2714 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
2806 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
2810 CallExpr::Create(*Context, DRE, InitExprs, superType, VK_LValue, in SynthMessageExpr()
[all …]
H A DRewriteModernObjC.cpp391 Stmt *RewriteLocalVariableExternalStorage(DeclRefExpr *DRE);
2103 DeclRefExpr *DRE = new (Context) DeclRefExpr(*Context, FD, false, msgSendType, in SynthesizeCallToFunctionDecl() local
2110 DRE, nullptr, VK_RValue, 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_RValue, 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 …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers/
H A DCastValueChecker.cpp121 if (const auto *DRE = dyn_cast<DeclRefExpr>(Object)) { in getNoteTag() local
122 Out << '\'' << DRE->getDecl()->getDeclName() << '\''; in getNoteTag()
152 if (const auto *DRE = dyn_cast<DeclRefExpr>(Object)) { in getNoteTag() local
153 Out << '\'' << DRE->getDecl()->getNameAsString() << '\''; in getNoteTag()
H A DDereferenceChecker.cpp118 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference() local
119 return DRE->getDecl()->getType()->isReferenceType(); in isDeclRefExprToReference()
H A DDeadStoresChecker.cpp421 if (const DeclRefExpr *DRE = in observeStmt() local
423 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt()
/netbsd-src/external/apache2/llvm/dist/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp88 DeclRefExpr DRE( in OMPLexicalScope() local
93 InlinedShareds.addPrivate(VD, [&CGF, &DRE]() -> Address { in OMPLexicalScope()
94 return CGF.EmitLValue(&DRE).getAddress(CGF); in OMPLexicalScope()
262 DeclRefExpr DRE(CGF.getContext(), const_cast<VarDecl *>(VD), in OMPSimdLexicalScope() local
268 InlinedShareds.addPrivate(VD, [&CGF, &DRE]() -> Address { in OMPSimdLexicalScope()
269 return CGF.EmitLValue(&DRE).getAddress(CGF); in OMPSimdLexicalScope()
293 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), IsCaptured, in EmitOMPSharedLValue() local
295 return EmitLValue(&DRE); in EmitOMPSharedLValue()
839 DeclRefExpr DRE(getContext(), const_cast<VarDecl *>(OrigVD), in EmitOMPFirstprivateClause() local
845 ConstantEmission CE = tryEmitAsConstant(&DRE); in EmitOMPFirstprivateClause()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core/
H A DBugReporterVisitors.cpp216 if (const auto *DRE = dyn_cast<DeclRefExpr>(CondVarExpr)) in getSValForVar() local
217 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in getSValForVar()
478 if (const auto *DRE = dyn_cast<DeclRefExpr>(Base)) in potentiallyWritesIntoIvar() local
479 if (const auto *ID = dyn_cast<ImplicitParamDecl>(DRE->getDecl())) in potentiallyWritesIntoIvar()
2679 const Expr *Cond, const DeclRefExpr *DRE, BugReporterContext &BRC, in VisitTrueTest() argument
2682 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in VisitTrueTest()
2691 if (!printValue(DRE, Out, N, TookTrue, IsAssuming)) in VisitTrueTest()
2696 if (isVarAnInterestingCondition(DRE, N, &report)) in VisitTrueTest()
2701 PathDiagnosticLocation Loc(DRE, BRC.getSourceManager(), LCtx); in VisitTrueTest()
2708 if (isInterestingExpr(DRE, N, &report)) in VisitTrueTest()
/netbsd-src/external/apache2/llvm/dist/clang/lib/AST/
H A DJSONNodeDumper.cpp1154 void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
1155 JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl())); in VisitDeclRefExpr()
1156 if (DRE->getDecl() != DRE->getFoundDecl()) in VisitDeclRefExpr()
1158 createBareDeclRef(DRE->getFoundDecl())); in VisitDeclRefExpr()
1159 switch (DRE->isNonOdrUse()) { in VisitDeclRefExpr()

123