Lines Matching defs:PrevDecl
444 /// that the template parameter 'PrevDecl' is being shadowed by a new
447 void Sema::DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl) {
448 assert(PrevDecl->isTemplateParameter() && "Not a template parameter");
458 << cast<NamedDecl>(PrevDecl)->getDeclName();
459 Diag(PrevDecl->getLocation(), diag::note_template_param_here);
532 NamedDecl *PrevDecl = SemaRef.LookupSingleName(
534 if (PrevDecl && PrevDecl->isTemplateParameter())
535 SemaRef.DiagnoseTemplateParameterShadow(Loc, PrevDecl);
904 NamedDecl *PrevDecl = nullptr;
906 PrevDecl = (*Previous.begin())->getUnderlyingDecl();
911 = dyn_cast_or_null<ClassTemplateDecl>(PrevDecl);
916 if (!PrevClassTemplate && PrevDecl && isa<CXXRecordDecl>(PrevDecl) &&
917 cast<CXXRecordDecl>(PrevDecl)->isInjectedClassName()) {
918 PrevDecl = cast<CXXRecordDecl>(PrevDecl->getDeclContext());
920 = cast<CXXRecordDecl>(PrevDecl)->getDescribedClassTemplate();
921 if (!PrevClassTemplate && isa<ClassTemplateSpecializationDecl>(PrevDecl)) {
923 = cast<ClassTemplateSpecializationDecl>(PrevDecl)
939 if (PrevDecl &&
940 (OutermostContext->Equals(PrevDecl->getDeclContext()) ||
941 OutermostContext->Encloses(PrevDecl->getDeclContext()))) {
942 SemanticContext = PrevDecl->getDeclContext();
947 PrevDecl = PrevClassTemplate = nullptr;
963 PrevDecl = (*Previous.begin())->getUnderlyingDecl();
966 } else if (PrevDecl &&
967 !isDeclInScope(PrevDecl, SemanticContext, S, SS.isValid()))
968 PrevDecl = PrevClassTemplate = nullptr;
1006 } else if (PrevDecl && PrevDecl->isTemplateParameter()) {
1008 DiagnoseTemplateParameterShadow(NameLoc, PrevDecl);
1010 PrevDecl = nullptr;
1011 } else if (PrevDecl) {
1018 Diag(PrevDecl->getLocation(), diag::note_previous_definition);
2318 NamedDecl *PrevDecl,
2498 VarTemplateSpecializationDecl *PrevDecl = nullptr;
2502 PrevDecl = VarTemplate->findPartialSpecialization(Converted, InsertPos);
2504 PrevDecl = VarTemplate->findSpecialization(Converted, InsertPos);
2510 if (CheckTemplateSpecializationScope(*this, VarTemplate, PrevDecl,
2515 if (PrevDecl && PrevDecl->getSpecializationKind() == TSK_Undeclared) {
2520 Specialization = PrevDecl;
2522 PrevDecl = nullptr;
2526 cast_or_null<VarTemplatePartialSpecializationDecl>(PrevDecl);
2576 if (!PrevDecl)
2586 if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {
2588 for (Decl *Prev = PrevDecl; Prev; Prev = Prev->getPreviousDecl()) {
2601 Diag(PrevDecl->getPointOfInstantiation(),
2603 << (PrevDecl->getTemplateSpecializationKind() !=
2620 if (PrevDecl) {
2625 PrevSpec.addDecl(PrevDecl);
5631 /// \param PrevDecl the previous declaration of this entity, if any.
5643 NamedDecl *PrevDecl,
5744 } else if ((!PrevDecl ||
5745 getTemplateSpecializationKind(PrevDecl) == TSK_Undeclared ||
5746 getTemplateSpecializationKind(PrevDecl) ==
6083 ClassTemplateSpecializationDecl *PrevDecl = nullptr;
6087 PrevDecl = ClassTemplate->findPartialSpecialization(Converted, InsertPos);
6089 PrevDecl = ClassTemplate->findSpecialization(Converted, InsertPos);
6096 CheckTemplateSpecializationScope(*this, ClassTemplate, PrevDecl,
6132 = cast_or_null<ClassTemplatePartialSpecializationDecl>(PrevDecl);
6198 PrevDecl);
6206 if (!PrevDecl)
6218 if (PrevDecl && PrevDecl->getPointOfInstantiation().isValid()) {
6220 for (Decl *Prev = PrevDecl; Prev; Prev = Prev->getPreviousDecl()) {
6233 Diag(PrevDecl->getPointOfInstantiation(),
6235 << (PrevDecl->getTemplateSpecializationKind()
6383 /// \param PrevDecl the previous declaration of the entity.
6398 NamedDecl *PrevDecl,
6425 StripImplicitInstantiation(PrevDecl);
6442 for (Decl *Prev = PrevDecl; Prev; Prev = Prev->getPreviousDecl()) {
6449 << PrevDecl;
6489 Diag(DiagLocForExplicitInstantiation(PrevDecl, PrevPointOfInstantiation),
6516 << PrevDecl;
6517 Diag(PrevDecl->getLocation(),
6531 for (Decl *Prev = PrevDecl; Prev; Prev = Prev->getPreviousDecl()) {
6551 << PrevDecl;
6552 Diag(DiagLocForExplicitInstantiation(PrevDecl, PrevPointOfInstantiation),
7098 ClassTemplateSpecializationDecl *PrevDecl
7102 = PrevDecl ? PrevDecl->getTemplateSpecializationKind() : TSK_Undeclared;
7116 if (PrevDecl) {
7118 PrevDecl, PrevDecl_TSK,
7119 PrevDecl->getPointOfInstantiation(),
7121 return PrevDecl;
7133 Specialization = PrevDecl;
7135 PrevDecl = nullptr;
7149 PrevDecl);
7152 if (!HasNoEffect && !PrevDecl) {
7296 CXXRecordDecl *PrevDecl
7298 if (!PrevDecl && Record->getDefinition())
7299 PrevDecl = Record;
7300 if (PrevDecl) {
7301 MemberSpecializationInfo *MSInfo = PrevDecl->getMemberSpecializationInfo();
7305 PrevDecl,
7633 FunctionDecl *PrevDecl = Specialization->getPreviousDecl();
7634 if (!PrevDecl && Specialization->isThisDeclarationADefinition())
7635 PrevDecl = Specialization;
7637 if (PrevDecl) {
7640 PrevDecl,
7641 PrevDecl->getTemplateSpecializationKind(),
7642 PrevDecl->getPointOfInstantiation(),