Home
last modified time | relevance | path

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

1234

/llvm-project-15.0.7/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.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()
/llvm-project-15.0.7/clang/test/SemaTemplate/
H A Dtemplate-id-printing.cpp17 namespace DRE { namespace
24 DRE::foo<int>; in test()
26 DRE::template foo<int>; in test()
28 DRE::foo<int>(); in test()
30 DRE::template foo<int>(); in test()
/llvm-project-15.0.7/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()
700 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
701 DiagnoseDeclAvailability(DRE->getDecl(), in VisitDeclRefExpr()
702 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()
750 if (DeclRefExpr *DRE = dyn_cast<clang::DeclRefExpr>(Res)) in FillInlineAsmIdentifierInfo() local
751 if (DRE->getDecl()->getKind() == Decl::EnumConstant) in FillInlineAsmIdentifierInfo()
/llvm-project-15.0.7/clang-tools-extra/include-cleaner/lib/
H A DWalkAST.cpp34 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
35 report(DRE->getLocation(), DRE->getFoundDecl()); in VisitDeclRefExpr()
/llvm-project-15.0.7/clang/lib/Analysis/
H A DUninitializedValues.cpp252 if (const auto *DRE = in findVar() local
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
368 Classification[DRE] = std::max(Classification[DRE], C); in classify()
[all …]
H A DThreadSafetyCommon.cpp298 til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, in translateDeclRefExpr() argument
300 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr()
467 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator() local
468 if (DRE->getDecl()->isCXXInstanceMember()) { in translateUnaryOperator()
472 return new (Arena) til::Project(W, DRE->getDecl()); in translateUnaryOperator()
526 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHS)) { in translateBinAssign() local
527 VD = DRE->getDecl(); in translateBinAssign()
592 if (const auto *DRE = dyn_cast<DeclRefExpr>(CE->getSubExpr())) { in translateCastExpr() local
593 til::SExpr *E0 = lookupVarDecl(DRE->getDecl()); in translateCastExpr()
H A DThreadSafety.cpp635 if (const auto *DRE = dyn_cast<DeclRefExpr>(LHSExp)) { in VisitBinaryOperator() local
636 const ValueDecl *VDec = DRE->getDecl(); in VisitBinaryOperator()
1404 else if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) { in getTrylockCallExpr() local
1405 const Expr *E = LocalVarMap.lookupExpr(DRE->getDecl(), C); in getTrylockCallExpr()
1661 while (const auto *DRE = dyn_cast<DeclRefExpr>(Exp)) { in checkAccess() local
1662 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()->getCanonicalDecl()); in checkAccess()
1896 DeclRefExpr DRE(VD->getASTContext(), VD, false, VD->getType(), VK_LValue, in handleCall() local
1899 CapabilityExpr Scp = Analyzer->SxBuilder.translateAttrExpr(&DRE, nullptr); in handleCall()
2416 DeclRefExpr DRE(VD->getASTContext(), VD, false, in runAnalysis() local
2419 LocksetBuilder.handleCall(&DRE, DD); in runAnalysis()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DAvoidBindCheck.cpp206 const auto *DRE = dyn_cast<DeclRefExpr>(E->IgnoreImplicit()); in tryCaptureAsLocalVariable() local
207 if (!DRE) in tryCaptureAsLocalVariable()
210 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in tryCaptureAsLocalVariable()
283 const auto *DRE = dyn_cast<DeclRefExpr>(E); in buildBindArguments() local
286 (DRE && MatchPlaceholder.match(DRE->getDecl()->getName(), &Matches))) { in buildBindArguments()
486 if (const auto *DRE = dyn_cast<DeclRefExpr>(CallExpression)) in getCallMethodDecl() local
487 return dyn_cast<FunctionDecl>(DRE->getDecl()); in getCallMethodDecl()
534 if (const auto *DRE = dyn_cast<DeclRefExpr>(NoTemporaries)) { in getCallableMaterialization() local
535 if (isa<FunctionDecl>(DRE->getDecl())) in getCallableMaterialization()
537 if (isa<VarDecl>(DRE->getDecl())) in getCallableMaterialization()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DInfiniteLoopCheck.cpp49 if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) { in isVarThatIsPossiblyChanged() local
50 if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl())) { in isVarThatIsPossiblyChanged()
102 if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) { in getCondVarNames() local
103 if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl())) in getCondVarNames()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DAliasing.cpp20 if (const auto *DRE = dyn_cast<DeclRefExpr>(S)) in isAccessForVar() local
21 return DRE->getDecl() == Var; in isAccessForVar()
/llvm-project-15.0.7/clang/unittests/Tooling/RecursiveASTVisitorTests/
H A DCallbacksCommon.h61 if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(S)) { in stmtToString() local
62 if (NamedDecl *ND = DRE->getFoundDecl()) { in stmtToString()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DPopulateSwitch.cpp159 if (auto *DRE = dyn_cast<DeclRefExpr>(CS->getLHS()->IgnoreParenCasts())) { in REGISTER_TWEAK() local
160 if (auto *Enumerator = dyn_cast<EnumConstantDecl>(DRE->getDecl())) { in REGISTER_TWEAK()
/llvm-project-15.0.7/clang/lib/Frontend/Rewrite/
H A DRewriteObjC.cpp2517 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local
2705 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
2797 DeclRefExpr *DRE = new (Context) in SynthMessageExpr() local
3659 BlockDeclRefs.push_back(DRE); in GetBlockDeclRefExprs()
3681 InnerBlockDeclRefs.push_back(DRE); in GetInnerBlockDeclRefExprs()
3868 ValueDecl *VD = DRE->getDecl(); in RewriteLocalVariableExternalStorage()
3871 return DRE; in RewriteLocalVariableExternalStorage()
3873 const_cast<ASTContext &>(*Context), DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage()
3878 ReplaceStmt(DRE, PE); in RewriteLocalVariableExternalStorage()
4410 DeclRefExpr *DRE = new (Context) in SynthBlockInitExpr() local
[all …]
H A DRewriteModernObjC.cpp2591 DeclRefExpr *DRE = new (Context) in RewriteObjCStringLiteral() local
3180 DeclRefExpr *DRE = new (Context) in SynthMsgSendStretCallExpr() local
3593 Context, Context->getPointerType(DRE->getType()), CK_BitCast, DRE); in RewriteObjCProtocolExpr()
4473 BlockDeclRefs.push_back(DRE); in GetBlockDeclRefExprs()
4700 ValueDecl *VD = DRE->getDecl(); in RewriteLocalVariableExternalStorage()
4703 return DRE; in RewriteLocalVariableExternalStorage()
4705 const_cast<ASTContext &>(*Context), DRE, UO_Deref, DRE->getType(), in RewriteLocalVariableExternalStorage()
4710 ReplaceStmt(DRE, PE); in RewriteLocalVariableExternalStorage()
5273 DeclRefExpr *DRE = new (Context) in SynthBlockInitExpr() local
5396 NewRep = DRE; in SynthBlockInitExpr()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/
H A DUnusedUsingDeclsCheck.cpp143 if (const auto *DRE = Result.Nodes.getNodeAs<DeclRefExpr>("used")) { in check() local
144 RemoveNamedDecl(DRE->getDecl()); in check()
/llvm-project-15.0.7/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.cpp149 if (const auto *DRE = dyn_cast<DeclRefExpr>(E)) in isDeclRefExprToReference() local
150 return DRE->getDecl()->getType()->isReferenceType(); in isDeclRefExprToReference()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DIncludeCleaner.cpp52 bool VisitDeclRefExpr(DeclRefExpr *DRE) { in VisitDeclRefExpr() argument
53 add(DRE->getDecl()); in VisitDeclRefExpr()
54 add(DRE->getFoundDecl()); in VisitDeclRefExpr()
H A DInlayHints.cpp539 if (auto *DRE = dyn_cast<DeclRefExpr>(E)) in getSpelledIdentifier() local
540 if (!DRE->getQualifier()) in getSpelledIdentifier()
541 return getSimpleName(*DRE->getDecl()); in getSpelledIdentifier()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DPreferMemberInitializerCheck.cpp52 if (const auto *DRE = dyn_cast<DeclRefExpr>(Value)) in shouldBeDefaultMemberInitializer() local
53 return isa<EnumConstantDecl>(DRE->getDecl()); in shouldBeDefaultMemberInitializer()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp93 DeclRefExpr DRE( in OMPLexicalScope() local
299 return EmitLValue(&DRE); in EmitOMPSharedLValue()
870 OriginalLVal = EmitLValue(&DRE); in EmitOMPFirstprivateClause()
873 OriginalLVal = EmitLValue(&DRE); in EmitOMPFirstprivateClause()
1493 if (!DRE) in checkForLastprivateConditionalUpdate()
1504 if (!DRE) in checkForLastprivateConditionalUpdate()
1515 if (!DRE) in checkForLastprivateConditionalUpdate()
1530 if (!DRE) in checkForLastprivateConditionalUpdate()
2151 &DRE, VD, in EmitOMPLinearClauseInit()
2275 const auto *VD = cast<VarDecl>(DRE->getDecl()); in EmitOMPPrivateLoopCounters()
[all …]

1234