Home
last modified time | relevance | path

Searched refs:PVD (Results 1 – 25 of 35) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DMIGChecker.cpp192 if (const ParmVarDecl *PVD = in checkPostCall() local
196 C.addTransition(C.getState()->add<RefCountedParameters>(PVD)); in checkPostCall()
211 const ParmVarDecl *PVD = getOriginParam(Arg, C); in checkPostCall() local
212 if (!PVD || State->contains<RefCountedParameters>(PVD)) in checkPostCall()
216 C.getNoteTag([this, PVD](PathSensitiveBugReport &BR) -> std::string { in checkPostCall()
221 OS << "Value passed through parameter '" << PVD->getName() in checkPostCall()
H A DObjCAutoreleaseWriteChecker.cpp116 const auto *PVD = Match.getNodeAs<ParmVarDecl>(ParamBind); in emitDiagnostics() local
117 QualType Ty = PVD->getType(); in emitDiagnostics()
149 BugMessage << "'" + PVD->getName() + "' "; in emitDiagnostics()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaSYCL.cpp389 const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl()); in TransformDeclRefExpr() local
390 if (PVD) { in TransformDeclRefExpr()
391 ParmDeclMap::iterator I = MapRef.find(PVD); in TransformDeclRefExpr()
394 assert(SemaRef.getASTContext().hasSameUnqualifiedType(PVD->getType(), in TransformDeclRefExpr()
396 assert(!VD->getType().isMoreQualifiedThan(PVD->getType(), in TransformDeclRefExpr()
441 for (ParmVarDecl *PVD : FD->parameters()) { in BuildSYCLKernelCallStmt()
443 getASTContext(), OFD, SourceLocation(), PVD->getIdentifier(), in BuildSYCLKernelCallStmt()
444 PVD->getType(), ImplicitParamKind::Other); in BuildSYCLKernelCallStmt()
446 ParmMap[PVD] = IPD; in BuildSYCLKernelCallStmt()
H A DSemaAttr.cpp283 for (ParmVarDecl *PVD : MD->parameters()) in inferLifetimeCaptureByAttribute()
284 if (PVD->hasAttr<LifetimeCaptureByAttr>()) in inferLifetimeCaptureByAttribute()
286 for (ParmVarDecl *PVD : MD->parameters()) { in inferLifetimeCaptureByAttribute()
291 if (PVD->getType()->isReferenceType() && in inferLifetimeCaptureByAttribute()
292 sema::isGLSPointerType(PVD->getType().getNonReferenceType())) { in inferLifetimeCaptureByAttribute()
294 PVD->addAttr( in inferLifetimeCaptureByAttribute()
H A DSemaConcept.cpp928 for (auto *PVD : FD->parameters()) { in SubstituteConstraintExpressionWithoutSatisfaction() local
929 if (!PVD->isParameterPack()) { in SubstituteConstraintExpressionWithoutSatisfaction()
930 ScopeForParameters->InstantiatedLocal(PVD, PVD); in SubstituteConstraintExpressionWithoutSatisfaction()
949 ScopeForParameters->MakeInstantiatedLocalArgPack(PVD); in SubstituteConstraintExpressionWithoutSatisfaction()
950 ScopeForParameters->InstantiatedLocalPackArg(PVD, PVD); in SubstituteConstraintExpressionWithoutSatisfaction()
H A DSemaTemplateInstantiate.cpp1463 if (auto *PVD = dyn_cast_if_present<ParmVarDecl>(VD); in TryExpandParameterPacks() local
1464 PVD && maybeInstantiateFunctionParameterToScope(PVD)) in TryExpandParameterPacks()
1791 for (ParmVarDecl *PVD : MD->parameters()) { in RebuildLambdaExpr()
1792 assert(PVD && "null in a parameter list"); in RebuildLambdaExpr()
1793 if (!PVD->hasDefaultArg()) in RebuildLambdaExpr()
1795 Expr *UninstExpr = PVD->getUninstantiatedDefaultArg(); in RebuildLambdaExpr()
1798 if (SemaRef.SubstDefaultArgument(EqualLoc, PVD, TemplateArgs)) { in RebuildLambdaExpr()
1806 PVD->setDefaultArg(ErrorResult.get()); in RebuildLambdaExpr()
1955 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(D); in TransformDecl() local
1956 PVD && SemaRef.CurrentInstantiationScope && in TransformDecl()
[all …]
H A DSemaObjC.cpp1807 const auto *PVD = dyn_cast<ParmVarDecl>(D); in isValidOSObjectOutParameter() local
1808 if (!PVD) in isValidOSObjectOutParameter()
1810 QualType QT = PVD->getType(); in isValidOSObjectOutParameter()
2240 auto *PVD = const_cast<ParmVarDecl *>(getFunctionOrMethodParam(D, I)); in handleExternallyRetainedAttr() local
2241 QualType Ty = PVD->getType(); in handleExternallyRetainedAttr()
2251 tryMakeVariablePseudoStrong(SemaRef, PVD, /*DiagnoseFailure=*/false); in handleExternallyRetainedAttr()
H A DSemaDeclAttr.cpp746 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) in VisitDeclRefExpr() local
747 if (Parms.count(PVD)) { in VisitDeclRefExpr()
4117 for (const ParmVarDecl *PVD : FD->parameters()) in handleCallbackAttr() local
4118 NameIdxMapping[PVD->getName()] = Idx++; in handleCallbackAttr()
4281 auto *PVD = dyn_cast<ParmVarDecl>(D); in handleLifetimeCaptureByAttr() local
4282 assert(PVD); in handleLifetimeCaptureByAttr()
4283 auto *CaptureByAttr = S.ParseLifetimeCaptureByAttr(AL, PVD->getName()); in handleLifetimeCaptureByAttr()
4291 for (ParmVarDecl *PVD : FD->parameters()) in LazyProcessLifetimeCaptureByParams()
4292 if (auto *A = PVD->getAttr<LifetimeCaptureByAttr>()) in LazyProcessLifetimeCaptureByParams()
4316 for (const ParmVarDecl *PVD : FD->parameters()) in LazyProcessLifetimeCaptureByParams() local
[all …]
H A DSemaTemplateInstantiateDecl.cpp346 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in instantiateOMPDeclareSimdDeclAttr() local
349 if (FD->getNumParams() > PVD->getFunctionScopeIndex()) in instantiateOMPDeclareSimdDeclAttr()
351 PVD, FD->getParamDecl(PVD->getFunctionScopeIndex())); in instantiateOMPDeclareSimdDeclAttr()
427 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in instantiateOMPDeclareVariantAttr() local
430 if (FD->getNumParams() > PVD->getFunctionScopeIndex()) in instantiateOMPDeclareVariantAttr()
432 PVD, FD->getParamDecl(PVD->getFunctionScopeIndex())); in instantiateOMPDeclareVariantAttr()
2938 for (ParmVarDecl *PVD : Function->parameters()) { in VisitFunctionDecl()
2939 if (!PVD->hasDefaultArg()) in VisitFunctionDecl()
2941 if (SemaRef.SubstDefaultArgument(D->getInnerLocStart(), PVD, TemplateArgs)) { in VisitFunctionDecl()
2945 Expr *UninstExpr = PVD->getUninstantiatedDefaultArg(); in VisitFunctionDecl()
[all …]
H A DSemaStmt.cpp2889 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in BuildCXXForRangeStmt() local
2890 QualType ArrayTy = PVD->getOriginalType(); in BuildCXXForRangeStmt()
2891 QualType PointerTy = PVD->getType(); in BuildCXXForRangeStmt()
2894 << RangeLoc << PVD << ArrayTy << PointerTy; in BuildCXXForRangeStmt()
2895 Diag(PVD->getLocation(), diag::note_declared_at); in BuildCXXForRangeStmt()
H A DSemaOpenMP.cpp6741 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) in ActOnOpenMPDeclareSimdDirective() local
6742 if (FD->getNumParams() > PVD->getFunctionScopeIndex() && in ActOnOpenMPDeclareSimdDirective()
6743 FD->getParamDecl(PVD->getFunctionScopeIndex()) in ActOnOpenMPDeclareSimdDirective()
6744 ->getCanonicalDecl() == PVD->getCanonicalDecl()) { in ActOnOpenMPDeclareSimdDirective()
6745 UniformedArgs.try_emplace(PVD->getCanonicalDecl(), E); in ActOnOpenMPDeclareSimdDirective()
6768 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in ActOnOpenMPDeclareSimdDirective() local
6769 const VarDecl *CanonPVD = PVD->getCanonicalDecl(); in ActOnOpenMPDeclareSimdDirective()
6770 if (FD->getNumParams() > PVD->getFunctionScopeIndex() && in ActOnOpenMPDeclareSimdDirective()
6771 FD->getParamDecl(PVD->getFunctionScopeIndex()) in ActOnOpenMPDeclareSimdDirective()
6784 QualType QTy = PVD->getType() in ActOnOpenMPDeclareSimdDirective()
[all …]
H A DSemaExpr.cpp4360 if (const auto *PVD = dyn_cast<ParmVarDecl>(DeclRef->getFoundDecl())) { in CheckUnaryExprOrTypeTraitOperand() local
4361 QualType OType = PVD->getOriginalType(); in CheckUnaryExprOrTypeTraitOperand()
4362 QualType Type = PVD->getType(); in CheckUnaryExprOrTypeTraitOperand()
4366 Diag(PVD->getLocation(), diag::note_declared_at); in CheckUnaryExprOrTypeTraitOperand()
6132 static void DiagnoseCalleeStaticArrayParam(Sema &S, ParmVarDecl *PVD) { in DiagnoseCalleeStaticArrayParam() argument
6133 TypeLoc TL = PVD->getTypeSourceInfo()->getTypeLoc(); in DiagnoseCalleeStaticArrayParam()
6137 S.Diag(PVD->getLocation(), diag::note_callee_static_array) in DiagnoseCalleeStaticArrayParam()
14509 for (auto *PVD : MD->parameters()) in CheckAddressOfOperand() local
14510 IsIncomplete |= ReturnOrParamTypeIsIncomplete(PVD->getType(), OpLoc, in CheckAddressOfOperand()
14511 PVD->getBeginLoc()); in CheckAddressOfOperand()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/
H A DRetainCountDiagnostics.cpp290 const ParmVarDecl *PVD = (*CE)->parameters()[*Idx]; in generateDiagnosticsForCallLike() local
291 PVD->getNameForDiagnostic(os, PVD->getASTContext().getPrintingPolicy(), in generateDiagnosticsForCallLike()
388 const ParmVarDecl *PVD = Parameters[I]; in annotateConsumedSummaryMismatch() local
390 if (!PVD->hasAttr<OSConsumedAttr>()) in annotateConsumedSummaryMismatch()
406 PVD->getNameForDiagnostic(os, PVD->getASTContext().getPrintingPolicy(), in annotateConsumedSummaryMismatch()
437 const auto *PVD = cast<ParmVarDecl>(VR->getDecl()); in annotateStartParameter() local
438 PathDiagnosticLocation L = PathDiagnosticLocation(PVD, SM); in annotateStartParameter()
442 os << "Parameter '" << PVD->getDeclName() << "' starts at +"; in annotateStartParameter()
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DAttr.h93 if (auto *PVD = getFunctionOrMethodParam(D, Idx)) in getFunctionOrMethodParamRange() local
94 return PVD->getSourceRange(); in getFunctionOrMethodParamRange()
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DUnsafeBufferUsage.cpp3396 const ParmVarDecl *PVD = FD->getParamDecl(i); in createOverloadsForFixedParams() local
3398 if (S.lookup(PVD) == FixitStrategy::Kind::Wontfix) in createOverloadsForFixedParams()
3400 if (S.lookup(PVD) != FixitStrategy::Kind::Span) in createOverloadsForFixedParams()
3406 getPointeeTypeText(PVD, SM, LangOpts, &PteTyQuals); in createOverloadsForFixedParams()
3548 static FixItList fixParamWithSpan(const ParmVarDecl *PVD, const ASTContext &Ctx, in fixParamWithSpan() argument
3550 if (hasUnsupportedSpecifiers(PVD, Ctx.getSourceManager())) { in fixParamWithSpan()
3551 DEBUG_NOTE_DECL_FAIL(PVD, " : has unsupport specifier(s)"); in fixParamWithSpan()
3554 if (PVD->hasDefaultArg()) { in fixParamWithSpan()
3556 DEBUG_NOTE_DECL_FAIL(PVD, " : has default arg"); in fixParamWithSpan()
3562 PVD, Ctx.getSourceManager(), Ctx.getLangOpts(), &PteTyQualifiers); in fixParamWithSpan()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DMemRegion.cpp623 const ParmVarDecl *PVD = getDecl(); in dumpToStream() local
624 assert(PVD && in dumpToStream()
627 if (const IdentifierInfo *ID = PVD->getIdentifier()) { in dumpToStream()
630 os << "ParamVarRegion{P" << PVD->getID() << '}'; in dumpToStream()
1043 const auto *PVD = dyn_cast<ParmVarDecl>(D); in getVarRegion() local
1044 if (PVD) { in getVarRegion()
1045 unsigned Index = PVD->getFunctionScopeIndex(); in getVarRegion()
1051 if (Index < FD->param_size() && FD->parameters()[Index] == PVD) in getVarRegion()
1055 if (Index < BD->param_size() && BD->parameters()[Index] == PVD) in getVarRegion()
H A DExprEngineCallAndReturn.cpp716 for (const ParmVarDecl *PVD : Call.parameters()) { in evalCall() local
718 QualType ParamTy = PVD->getType(); in evalCall()
H A DBugReporterVisitors.cpp651 const ParmVarDecl *PVD = Parameters[I]; in maybeEmitNoteForParameters() local
653 bool ParamIsReferenceType = PVD->getType()->isReferenceType(); in maybeEmitNoteForParameters()
654 std::string ParamName = PVD->getNameAsString(); in maybeEmitNoteForParameters()
657 QualType T = PVD->getType(); in maybeEmitNoteForParameters()
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/
H A DSValExplainer.h258 const ParmVarDecl *PVD = R->getDecl(); in VisitParamVarRegion() local
259 std::string Name = PVD->getQualifiedNameAsString(); in VisitParamVarRegion()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DSIRegisterInfo.cpp2104 auto PVD = SB.getPerVGPRData(); in spillSGPR() local
2106 for (unsigned Offset = 0; Offset < PVD.NumVGPRs; ++Offset) { in spillSGPR()
2110 for (unsigned i = Offset * PVD.PerVGPR, in spillSGPR()
2111 e = std::min((Offset + 1) * PVD.PerVGPR, SB.NumSubRegs); in spillSGPR()
2122 .addImm(i % PVD.PerVGPR) in spillSGPR()
2198 auto PVD = SB.getPerVGPRData(); in restoreSGPR() local
2200 for (unsigned Offset = 0; Offset < PVD.NumVGPRs; ++Offset) { in restoreSGPR()
2205 for (unsigned i = Offset * PVD.PerVGPR, in restoreSGPR()
2206 e = std::min((Offset + 1) * PVD.PerVGPR, SB.NumSubRegs); in restoreSGPR()
2248 auto PVD = SB.getPerVGPRData(); in spillEmergencySGPR() local
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGCall.cpp3022 static const NonNullAttr *getNonNullAttr(const Decl *FD, const ParmVarDecl *PVD, in getNonNullAttr() argument
3034 if (PVD) { in getNonNullAttr()
3035 if (auto ParmNNAttr = PVD->getAttr<NonNullAttr>()) in getNonNullAttr()
3197 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(Arg)) { in EmitFunctionProlog() local
3199 if (getNonNullAttr(CurCodeDecl, PVD, PVD->getType(), in EmitFunctionProlog()
3200 PVD->getFunctionScopeIndex()) && in EmitFunctionProlog()
3204 QualType OTy = PVD->getOriginalType(); in EmitFunctionProlog()
3248 const auto *AVAttr = PVD->getAttr<AlignValueAttr>(); in EmitFunctionProlog()
4536 auto PVD = ParmNum < AC.getNumParams() ? AC.getParamDecl(ParmNum) : nullptr; in EmitNonNullArgCheck() local
4537 unsigned ArgNo = PVD ? PVD->getFunctionScopeIndex() : ParmNum; in EmitNonNullArgCheck()
[all …]
H A DCGObjC.cpp1475 ParmVarDecl *PVD = *setterMethod->param_begin(); in generateObjCSetterBody() local
1481 LValue Src = MakeAddrLValue(GetAddrOfLocalVar(PVD), ivar->getType()); in generateObjCSetterBody()
1488 DeactivateCleanupBlock(CalleeDestructedParamCleanups[PVD], AllocaInsertPt); in generateObjCSetterBody()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/Targets/
H A DAArch64.cpp1199 for (ParmVarDecl *PVD : FuncDecl->parameters()) { in checkFunctionABI()
1200 diagnoseIfNeedsFPReg(CGM.getDiags(), TI.getABI(), ABIInfo, PVD->getType(), in checkFunctionABI()
1201 PVD, FuncDecl->getLocation()); in checkFunctionABI()
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DCompiler.cpp5816 for (const ParmVarDecl *PVD : MD->parameters()) { in emitLambdaStaticInvokerBody() local
5817 auto It = this->Params.find(PVD); in emitLambdaStaticInvokerBody()
5822 PrimType ParamType = this->classify(PVD->getType()).value_or(PT_Ptr); in emitLambdaStaticInvokerBody()
5892 auto PVD = Ctor->getParamDecl(0); in compileConstructor() local
5893 ParamOffset PO = this->Params[PVD]; // Must exist. in compileConstructor()
6047 auto PVD = MD->getParamDecl(0); in compileUnionAssignmentOperator() local
6048 ParamOffset PO = this->Params[PVD]; // Must exist. in compileUnionAssignmentOperator()
6580 if (const auto *PVD = dyn_cast<ParmVarDecl>(D)) { in visitDeclRef() local
6581 if (auto It = this->Params.find(PVD); It != this->Params.end()) { in visitDeclRef()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DExprConstant.cpp530 const ParmVarDecl *getOrigParam(const ParmVarDecl *PVD) const { in getOrigParam()
531 return OrigCallee ? OrigCallee->getParamDecl(PVD->getFunctionScopeIndex()) in getOrigParam()
532 : PVD; in getOrigParam()
653 APValue &createParam(CallRef Args, const ParmVarDecl *PVD, LValue &LV);
1128 APValue *getParamSlot(CallRef Call, const ParmVarDecl *PVD) { in getParamSlot() argument
1130 return Frame ? Frame->getTemporary(Call.getOrigParam(PVD), Call.Version) in getParamSlot()
1960 APValue &CallStackFrame::createParam(CallRef Args, const ParmVarDecl *PVD, in createParam() argument
1963 APValue::LValueBase Base(PVD, Index, Args.Version); in createParam()
1968 return createLocal(Base, PVD, PVD->getType(), ScopeKind::Call); in createParam()
2294 if (auto *PVD = dyn_cast_or_null<ParmVarDecl>(VD)) { in NoteLValueLocation() local
[all …]

12