/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
D | MIGChecker.cpp | 187 if (const ParmVarDecl *PVD = in checkPostCall() local 191 C.addTransition(C.getState()->add<RefCountedParameters>(PVD)); in checkPostCall() 209 const ParmVarDecl *PVD = getOriginParam(Arg, C); in checkPostCall() local 210 if (!PVD || State->contains<RefCountedParameters>(PVD)) in checkPostCall() 214 C.getNoteTag([this, PVD](PathSensitiveBugReport &BR) -> std::string { in checkPostCall() 219 OS << "Value passed through parameter '" << PVD->getName() in checkPostCall()
|
D | FuchsiaHandleChecker.cpp | 313 const ParmVarDecl *PVD = FuncDecl->getParamDecl(Arg); in checkPreCall() local 315 getFuchsiaHandleSymbols(PVD->getType(), Call.getArgSVal(Arg), State); in checkPreCall() 318 if (hasFuchsiaAttr<ReleaseHandleAttr>(PVD) || in checkPreCall() 319 hasFuchsiaAttr<AcquireHandleAttr>(PVD)) in checkPreCall() 327 if (hasFuchsiaAttr<UseHandleAttr>(PVD) || in checkPreCall() 328 PVD->getType()->isIntegerType()) { in checkPreCall() 378 const ParmVarDecl *PVD = FuncDecl->getParamDecl(Arg); in checkPostCall() local 379 unsigned ParamDiagIdx = PVD->getFunctionScopeIndex() + 1; in checkPostCall() 381 getFuchsiaHandleSymbols(PVD->getType(), Call.getArgSVal(Arg), State); in checkPostCall() 387 if (hasFuchsiaAttr<ReleaseHandleAttr>(PVD)) { in checkPostCall() [all …]
|
D | ObjCAutoreleaseWriteChecker.cpp | 114 const auto *PVD = Match.getNodeAs<ParmVarDecl>(ParamBind); in emitDiagnostics() local 115 QualType Ty = PVD->getType(); in emitDiagnostics() 147 BugMessage << "'" + PVD->getName() + "' "; in emitDiagnostics()
|
/external/llvm-project/clang/unittests/StaticAnalyzer/ |
D | ParamRegionTest.cpp | 21 const ParmVarDecl *PVD) { in checkForSameParamRegions() argument 22 ASSERT_TRUE(llvm::all_of(PVD->redecls(), [&](const clang::VarDecl *D2) { in checkForSameParamRegions() 23 return MRMgr.getVarRegion(PVD, SFC) == in checkForSameParamRegions()
|
/external/llvm-project/clang-tools-extra/clangd/ |
D | Hover.cpp | 281 const Expr *getDefaultArg(const ParmVarDecl *PVD) { in getDefaultArg() argument 286 if (!PVD->hasDefaultArg() || PVD->hasUnparsedDefaultArg()) in getDefaultArg() 288 return PVD->hasUninstantiatedDefaultArg() ? PVD->getUninstantiatedDefaultArg() in getDefaultArg() 289 : PVD->getDefaultArg(); in getDefaultArg() 292 HoverInfo::Param toHoverInfoParam(const ParmVarDecl *PVD, in toHoverInfoParam() argument 295 Out.Type = printType(PVD->getType(), Policy); in toHoverInfoParam() 296 if (!PVD->getName().empty()) in toHoverInfoParam() 297 Out.Name = PVD->getNameAsString(); in toHoverInfoParam() 298 if (const Expr *DefArg = getDefaultArg(PVD)) { in toHoverInfoParam() 311 for (const ParmVarDecl *PVD : FD->parameters()) in fillFunctionTypeAndParams() local [all …]
|
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/ |
D | RetainCountDiagnostics.cpp | 294 const ParmVarDecl *PVD = (*CE)->parameters()[*Idx]; in generateDiagnosticsForCallLike() local 295 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()
|
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/ |
D | DefineOutline.cpp | 188 for (const auto *PVD : FD->parameters()) { in getFunctionSourceCode() local 189 if (PVD->hasDefaultArg()) { in getFunctionSourceCode() 191 auto DelRange = CharSourceRange::getTokenRange(PVD->getDefaultArgRange()); in getFunctionSourceCode() 193 auto Tokens = TokBuf.expandedTokens(PVD->getSourceRange()) in getFunctionSourceCode()
|
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
D | ArgumentCommentCheck.cpp | 279 const ParmVarDecl *PVD = Callee->getParamDecl(I); in checkCallArgs() local 280 IdentifierInfo *II = PVD->getIdentifier(); in checkCallArgs() 322 diag(PVD->getLocation(), "%0 declared here", DiagnosticIDs::Note) << II; in checkCallArgs()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Core/ |
D | MemRegion.cpp | 578 const ParmVarDecl *PVD = getDecl(); in dumpToStream() local 579 assert(PVD && in dumpToStream() 582 if (const IdentifierInfo *ID = PVD->getIdentifier()) { in dumpToStream() 585 os << "ParamVarRegion{P" << PVD->getID() << '}'; in dumpToStream() 928 const auto *PVD = dyn_cast<ParmVarDecl>(D); in getVarRegion() local 929 if (PVD) { in getVarRegion() 930 unsigned Index = PVD->getFunctionScopeIndex(); in getVarRegion() 936 if (Index < FD->param_size() && FD->parameters()[Index] == PVD) in getVarRegion() 940 if (Index < BD->param_size() && BD->parameters()[Index] == PVD) in getVarRegion()
|
D | ExprEngineCallAndReturn.cpp | 612 for (const ParmVarDecl *PVD : Call.parameters()) { in evalCall() local 614 QualType ParamTy = PVD->getType(); in evalCall()
|
D | BugReporterVisitors.cpp | 586 const ParmVarDecl *PVD = parameters[I]; in VisitNode() local 588 bool ParamIsReferenceType = PVD->getType()->isReferenceType(); in VisitNode() 589 std::string ParamName = PVD->getNameAsString(); in VisitNode() 592 QualType T = PVD->getType(); in VisitNode()
|
/external/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/ |
D | SValExplainer.h | 224 const ParmVarDecl *PVD = R->getDecl(); in VisitParamVarRegion() local 225 std::string Name = PVD->getQualifiedNameAsString(); in VisitParamVarRegion()
|
/external/clang/lib/Frontend/ |
D | ASTConsumers.cpp | 443 ParmVarDecl* PVD = cast<ParmVarDecl>(I); in PrintDeclContext() local 444 Out << "<parameter> " << *PVD << '\n'; in PrintDeclContext()
|
/external/clang/include/clang/CodeGen/ |
D | CGFunctionInfo.h | 404 llvm::count_if(FD->parameters(), [](const ParmVarDecl *PVD) { in forPrototypePlus() 405 return PVD->hasAttr<PassObjectSizeAttr>(); in forPrototypePlus()
|
/external/llvm-project/clang/lib/CodeGen/ |
D | CGCall.cpp | 2373 static const NonNullAttr *getNonNullAttr(const Decl *FD, const ParmVarDecl *PVD, in getNonNullAttr() argument 2385 if (PVD) { in getNonNullAttr() 2386 if (auto ParmNNAttr = PVD->getAttr<NonNullAttr>()) in getNonNullAttr() 2550 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(Arg)) { in EmitFunctionProlog() local 2552 if (getNonNullAttr(CurCodeDecl, PVD, PVD->getType(), in EmitFunctionProlog() 2553 PVD->getFunctionScopeIndex()) && in EmitFunctionProlog() 2557 QualType OTy = PVD->getOriginalType(); in EmitFunctionProlog() 2600 const auto *AVAttr = PVD->getAttr<AlignValueAttr>(); in EmitFunctionProlog() 3780 auto PVD = ParmNum < AC.getNumParams() ? AC.getParamDecl(ParmNum) : nullptr; in EmitNonNullArgCheck() local 3781 unsigned ArgNo = PVD ? PVD->getFunctionScopeIndex() : ParmNum; in EmitNonNullArgCheck() [all …]
|
D | CGStmtOpenMP.cpp | 4193 VarDecl *PVD = nullptr; in EmitOMPTargetTaskBasedDirective() local 4205 PVD = createImplicitFirstprivateForType( in EmitOMPTargetTaskBasedDirective() 4215 TargetScope.addPrivate(PVD, in EmitOMPTargetTaskBasedDirective() 4236 auto &&CodeGen = [&Data, &S, CS, &BodyGen, BPVD, PVD, SVD, MVD, in EmitOMPTargetTaskBasedDirective() 4274 CGF.GetAddrOfLocalVar(PVD), /*Index=*/0); in EmitOMPTargetTaskBasedDirective() 6384 const ImplicitParamDecl *PVD, in mapParam() argument 6388 [&CGF, PVD]() { return CGF.GetAddrOfLocalVar(PVD); }); in mapParam()
|
/external/clang/lib/CodeGen/ |
D | CGCall.cpp | 2034 static const NonNullAttr *getNonNullAttr(const Decl *FD, const ParmVarDecl *PVD, in getNonNullAttr() argument 2046 if (PVD) { in getNonNullAttr() 2047 if (auto ParmNNAttr = PVD->getAttr<NonNullAttr>()) in getNonNullAttr() 2209 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(Arg)) { in EmitFunctionProlog() local 2210 if (getNonNullAttr(CurCodeDecl, PVD, PVD->getType(), in EmitFunctionProlog() 2211 PVD->getFunctionScopeIndex())) in EmitFunctionProlog() 2216 QualType OTy = PVD->getOriginalType(); in EmitFunctionProlog() 2251 const auto *AVAttr = PVD->getAttr<AlignValueAttr>(); in EmitFunctionProlog() 3154 auto PVD = ParmNum < FD->getNumParams() ? FD->getParamDecl(ParmNum) : nullptr; in EmitNonNullArgCheck() local 3155 unsigned ArgNo = PVD ? PVD->getFunctionScopeIndex() : ParmNum; in EmitNonNullArgCheck() [all …]
|
D | CodeGenFunction.cpp | 893 if (const ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(VD)) in StartFunction() local 894 Ty = PVD->getOriginalType(); in StartFunction()
|
D | CGOpenMPRuntime.cpp | 6421 auto *PVD = cast<ParmVarDecl>(cast<DeclRefExpr>(E)->getDecl()) in emitDeclareSimdFunction() local 6423 Pos = ParamPositions[PVD]; in emitDeclareSimdFunction() 6437 auto *PVD = cast<ParmVarDecl>(cast<DeclRefExpr>(E)->getDecl()) in emitDeclareSimdFunction() local 6439 Pos = ParamPositions[PVD]; in emitDeclareSimdFunction() 6440 ParmTy = PVD->getType(); in emitDeclareSimdFunction() 6458 auto *PVD = cast<ParmVarDecl>(cast<DeclRefExpr>(E)->getDecl()) in emitDeclareSimdFunction() local 6460 Pos = ParamPositions[PVD]; in emitDeclareSimdFunction()
|
/external/clang/lib/Sema/ |
D | SemaOpenMP.cpp | 3672 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) in ActOnOpenMPDeclareSimdDirective() local 3673 if (FD->getNumParams() > PVD->getFunctionScopeIndex() && in ActOnOpenMPDeclareSimdDirective() 3674 FD->getParamDecl(PVD->getFunctionScopeIndex()) in ActOnOpenMPDeclareSimdDirective() 3675 ->getCanonicalDecl() == PVD->getCanonicalDecl()) { in ActOnOpenMPDeclareSimdDirective() 3676 UniformedArgs.insert(std::make_pair(PVD->getCanonicalDecl(), E)); in ActOnOpenMPDeclareSimdDirective() 3699 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in ActOnOpenMPDeclareSimdDirective() local 3700 auto *CanonPVD = PVD->getCanonicalDecl(); in ActOnOpenMPDeclareSimdDirective() 3701 if (FD->getNumParams() > PVD->getFunctionScopeIndex() && in ActOnOpenMPDeclareSimdDirective() 3702 FD->getParamDecl(PVD->getFunctionScopeIndex()) in ActOnOpenMPDeclareSimdDirective() 3715 QualType QTy = PVD->getType() in ActOnOpenMPDeclareSimdDirective() [all …]
|
D | SemaStmt.cpp | 2293 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in BuildCXXForRangeStmt() local 2294 QualType ArrayTy = PVD->getOriginalType(); in BuildCXXForRangeStmt() 2295 QualType PointerTy = PVD->getType(); in BuildCXXForRangeStmt() 2298 << RangeLoc << PVD << ArrayTy << PointerTy; in BuildCXXForRangeStmt() 2299 Diag(PVD->getLocation(), diag::note_declared_at); in BuildCXXForRangeStmt()
|
/external/llvm-project/clang/lib/Sema/ |
D | SemaDeclAttr.cpp | 121 if (auto *PVD = getFunctionOrMethodParam(D, Idx)) in getFunctionOrMethodParamRange() local 122 return PVD->getSourceRange(); in getFunctionOrMethodParamRange() 1039 if (const auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) in VisitDeclRefExpr() local 1040 if (Parms.count(PVD)) { in VisitDeclRefExpr() 3497 for (const ParmVarDecl *PVD : FD->parameters()) in handleCallbackAttr() local 3498 NameIdxMapping[PVD->getName()] = Idx++; in handleCallbackAttr() 5239 const auto *PVD = dyn_cast<ParmVarDecl>(D); in isValidOSObjectOutParameter() local 5240 if (!PVD) in isValidOSObjectOutParameter() 5242 QualType QT = PVD->getType(); in isValidOSObjectOutParameter() 7323 auto *PVD = const_cast<ParmVarDecl *>(getFunctionOrMethodParam(D, I)); in handleObjCExternallyRetainedAttr() local [all …]
|
D | SemaTemplateInstantiateDecl.cpp | 301 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in instantiateOMPDeclareSimdDeclAttr() local 304 if (FD->getNumParams() > PVD->getFunctionScopeIndex()) in instantiateOMPDeclareSimdDeclAttr() 306 PVD, FD->getParamDecl(PVD->getFunctionScopeIndex())); in instantiateOMPDeclareSimdDeclAttr() 382 if (auto *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in instantiateOMPDeclareVariantAttr() local 385 if (FD->getNumParams() > PVD->getFunctionScopeIndex()) in instantiateOMPDeclareVariantAttr() 387 PVD, FD->getParamDecl(PVD->getFunctionScopeIndex())); in instantiateOMPDeclareVariantAttr()
|
D | SemaStmt.cpp | 2581 if (ParmVarDecl *PVD = dyn_cast<ParmVarDecl>(DRE->getDecl())) { in BuildCXXForRangeStmt() local 2582 QualType ArrayTy = PVD->getOriginalType(); in BuildCXXForRangeStmt() 2583 QualType PointerTy = PVD->getType(); in BuildCXXForRangeStmt() 2586 << RangeLoc << PVD << ArrayTy << PointerTy; in BuildCXXForRangeStmt() 2587 Diag(PVD->getLocation(), diag::note_declared_at); in BuildCXXForRangeStmt()
|
/external/llvm-project/clang/lib/AST/ |
D | ExprConstant.cpp | 500 const ParmVarDecl *getOrigParam(const ParmVarDecl *PVD) const { in getOrigParam() 501 return OrigCallee ? OrigCallee->getParamDecl(PVD->getFunctionScopeIndex()) in getOrigParam() 502 : PVD; in getOrigParam() 625 APValue &createParam(CallRef Args, const ParmVarDecl *PVD, LValue &LV); 1040 APValue *getParamSlot(CallRef Call, const ParmVarDecl *PVD) { in getParamSlot() argument 1042 return Frame ? Frame->getTemporary(Call.getOrigParam(PVD), Call.Version) in getParamSlot() 1856 APValue &CallStackFrame::createParam(CallRef Args, const ParmVarDecl *PVD, in createParam() argument 1859 APValue::LValueBase Base(PVD, Index, Args.Version); in createParam() 1864 return createLocal(Base, PVD, PVD->getType(), ScopeKind::Call); in createParam() 2070 if (auto *PVD = dyn_cast_or_null<ParmVarDecl>(VD)) { in NoteLValueLocation() local [all …]
|