Home
last modified time | relevance | path

Searched refs:VDecl (Results 1 – 13 of 13) sorted by relevance

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DRedundantStringInitCheck.cpp126 if (const auto *VDecl = Result.Nodes.getNodeAs<VarDecl>("vardecl")) { in check() local
129 SourceRange ReplaceRange(VDecl->getLocation(), VDecl->getEndLoc()); in check()
130 diag(VDecl->getLocation(), "redundant string initialization") in check()
131 << FixItHint::CreateReplacement(ReplaceRange, VDecl->getName()); in check()
H A DElseAfterReturnCheck.cpp280 const VarDecl *VDecl = If->getConditionVariable(); in check() local
289 VDecl->getName()); in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DLoopConvertUtils.cpp357 const auto *VDecl = dyn_cast<VarDecl>(TheDecl); in isAliasDecl() local
358 if (!VDecl) in isAliasDecl()
360 if (!VDecl->hasInit()) in isAliasDecl()
364 const Expr *Init = VDecl->getInit()->IgnoreParenImpCasts(); in isAliasDecl()
376 QualType DeclarationType = VDecl->getType(); in isAliasDecl()
788 const VarDecl *VDecl = C->getCapturedVar(); in TraverseLambdaCapture() local
789 if (areSameVariable(IndexVar, cast<ValueDecl>(VDecl))) { in TraverseLambdaCapture()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaDecl.cpp12187 VarDecl *VDecl; member
12192 return VN.VDecl ? Diag << VN.VDecl : Diag << VN.Name; in operator <<()
12203 assert((!VDecl || !VDecl->isInitCapture()) && in deduceVarTypeFromInitializer()
12294 if (VDecl && isa<DecompositionDecl>(VDecl) && in deduceVarTypeFromInitializer()
12337 VDecl, VDecl->getDeclName(), VDecl->getType(), VDecl->getTypeSourceInfo(), in DeduceVariableDeclarationType()
12660 if (!VDecl) { in AddInitializerToDecl()
12698 if (VDecl->isLocalVarDecl() && VDecl->hasExternalStorage()) { in AddInitializerToDecl()
12730 (!VDecl->isStaticDataMember() || VDecl->isOutOfLine()) && in AddInitializerToDecl()
12860 checkUnsafeAssigns(VDecl->getLocation(), VDecl->getType(), Init); in AddInitializerToDecl()
12940 } else if (VDecl->isStaticDataMember() && !VDecl->isInline() && in AddInitializerToDecl()
[all …]
H A DSemaExprMember.cpp1149 DeclResult VDecl = CheckVarTemplateId(VarTempl, TemplateKWLoc, in BuildMemberReferenceExpr() local
1151 if (VDecl.isInvalid()) in BuildMemberReferenceExpr()
1155 if (!VDecl.get()) in BuildMemberReferenceExpr()
1160 VarDecl *Var = cast<VarDecl>(VDecl.get()); in BuildMemberReferenceExpr()
H A DSemaTemplateDeduction.cpp4843 void Sema::DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init) { in DiagnoseAutoDeductionFailure() argument
4845 Diag(VDecl->getLocation(), in DiagnoseAutoDeductionFailure()
4846 VDecl->isInitCapture() in DiagnoseAutoDeductionFailure()
4849 << VDecl->getDeclName() << VDecl->getType() << Init->getSourceRange(); in DiagnoseAutoDeductionFailure()
4851 Diag(VDecl->getLocation(), in DiagnoseAutoDeductionFailure()
4852 VDecl->isInitCapture() ? diag::err_init_capture_deduction_failure in DiagnoseAutoDeductionFailure()
4854 << VDecl->getDeclName() << VDecl->getType() << Init->getType() in DiagnoseAutoDeductionFailure()
H A DSemaDeclObjC.cpp4203 if (VarDecl *VDecl = dyn_cast<VarDecl>(*I)) { in ActOnAtEnd() local
4204 if (!VDecl->hasExternalStorage()) in ActOnAtEnd()
4205 Diag(VDecl->getLocation(), diag::err_objc_var_decl_inclass); in ActOnAtEnd()
H A DSemaExpr.cpp13504 } else if (const VarDecl *VDecl = dyn_cast<VarDecl>(VD)) { in DiagnoseConstAssignment() local
13505 if (VDecl->getType().isConstQualified()) { in DiagnoseConstAssignment()
13508 << ExprRange << ConstMember << true /*static*/ << VDecl in DiagnoseConstAssignment()
13509 << VDecl->getType(); in DiagnoseConstAssignment()
13513 << ConstMember << true /*static*/ << VDecl << VDecl->getType() in DiagnoseConstAssignment()
13514 << VDecl->getSourceRange(); in DiagnoseConstAssignment()
H A DSemaDeclCXX.cpp103 } else if (const auto *VDecl = dyn_cast<VarDecl>(Decl)) { in VisitDeclRefExpr() local
115 if (VDecl->isLocalVarDecl() && !DRE->isNonOdrUse()) in VisitDeclRefExpr()
118 << VDecl->getDeclName() << DefaultArg->getSourceRange(); in VisitDeclRefExpr()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGStmtOpenMP.cpp2458 auto VDecl = cast<VarDecl>(Helper->getDecl()); in EmitOMPHelperVar() local
2459 CGF.EmitVarDecl(*VDecl); in EmitOMPHelperVar()
7532 const auto *VDecl = cast<VarDecl>(Helper->getDecl()); in mapParam() local
7533 Privates.addPrivate(VDecl, CGF.GetAddrOfLocalVar(PVD)); in mapParam()
H A DCGCall.cpp2296 else if (const VarDecl *VDecl = dyn_cast<VarDecl>(TargetDecl)) in ConstructAttributeList() local
2298 HasStrictReturn &= !VDecl->isExternC(); in ConstructAttributeList()
H A DCGOpenMPRuntime.cpp9079 const ValueDecl *VDecl, *Mapper; in generateInfoForCapture() local
9083 std::tie(VDecl, Components, Mapper) = L; in generateInfoForCapture()
9084 assert(VDecl == VD && "We got information for the wrong declaration??"); in generateInfoForCapture()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DSema.h2863 bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit,
8852 void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
8865 QualType deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name,