• Home
  • Raw
  • Download

Lines Matching refs:PrevDecl

4099   NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl();  in CheckAnonMemberRedeclaration()  local
4100 assert(PrevDecl && "Expected a non-null Decl"); in CheckAnonMemberRedeclaration()
4102 if (!SemaRef.isDeclInScope(PrevDecl, Owner, S)) in CheckAnonMemberRedeclaration()
4107 SemaRef.Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckAnonMemberRedeclaration()
5442 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC, in isOutOfScopePreviousDeclaration() argument
5444 if (!PrevDecl) in isOutOfScopePreviousDeclaration()
5447 if (!PrevDecl->hasLinkage()) in isOutOfScopePreviousDeclaration()
5462 DeclContext *PrevOuterContext = PrevDecl->getDeclContext(); in isOutOfScopePreviousDeclaration()
10857 NamedDecl *PrevDecl = R.getFoundDecl(); in ActOnParamDeclarator() local
10858 if (PrevDecl->isTemplateParameter()) { in ActOnParamDeclarator()
10860 DiagnoseTemplateParameterShadow(D.getIdentifierLoc(), PrevDecl); in ActOnParamDeclarator()
10862 PrevDecl = nullptr; in ActOnParamDeclarator()
10863 } else if (S->isDeclScope(PrevDecl)) { in ActOnParamDeclarator()
10865 Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in ActOnParamDeclarator()
12597 NamedDecl *PrevDecl = Previous.getFoundDecl(); in ActOnTag() local
12610 if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(PrevDecl)) { in ActOnTag()
12616 PrevDecl = Tag; in ActOnTag()
12629 auto *OldTag = dyn_cast<TagDecl>(PrevDecl); in ActOnTag()
12645 if (TagDecl *PrevTagDecl = dyn_cast<TagDecl>(PrevDecl)) { in ActOnTag()
12711 if (TUK == TUK_Declaration && PrevDecl->isCXXClassMember() && in ActOnTag()
12712 S->isDeclScope(PrevDecl)) { in ActOnTag()
12728 PrevDecl->getLocation()) != in ActOnTag()
12739 ->Equals(PrevDecl->getDeclContext()->getRedeclContext())) in ActOnTag()
12843 if (isa<TypedefDecl>(PrevDecl)) Kind = 1; in ActOnTag()
12844 else if (isa<TypeAliasDecl>(PrevDecl)) Kind = 2; in ActOnTag()
12845 else if (isa<ClassTemplateDecl>(PrevDecl)) Kind = 3; in ActOnTag()
12847 Diag(PrevDecl->getLocation(), diag::note_declared_at); in ActOnTag()
12858 if (isa<TypedefDecl>(PrevDecl)) Kind = 1; in ActOnTag()
12859 else if (isa<TypeAliasDecl>(PrevDecl)) Kind = 2; in ActOnTag()
12860 else if (isa<ClassTemplateDecl>(PrevDecl)) Kind = 3; in ActOnTag()
12862 Diag(PrevDecl->getLocation(), diag::note_previous_decl) << PrevDecl; in ActOnTag()
12867 } else if (TypedefNameDecl *TND = dyn_cast<TypedefNameDecl>(PrevDecl)) { in ActOnTag()
12869 if (isa<TypeAliasDecl>(PrevDecl)) Kind = 1; in ActOnTag()
12872 Diag(PrevDecl->getLocation(), diag::note_previous_decl) << PrevDecl; in ActOnTag()
12880 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnTag()
12893 TagDecl *PrevDecl = nullptr; in ActOnTag()
12895 PrevDecl = cast<TagDecl>(Previous.getFoundDecl()); in ActOnTag()
12912 cast_or_null<EnumDecl>(PrevDecl), ScopedEnum, in ActOnTag()
12922 else if (PrevDecl && (Def = cast<EnumDecl>(PrevDecl)->getDefinition())) { in ActOnTag()
12958 cast_or_null<CXXRecordDecl>(PrevDecl)); in ActOnTag()
12964 cast_or_null<RecordDecl>(PrevDecl)); in ActOnTag()
13043 } else if (!PrevDecl) { in ActOnTag()
13068 SetMemberAccessSpecifier(New, PrevDecl, AS); in ActOnTag()
13077 if (PrevDecl) in ActOnTag()
13078 New->setAccess(PrevDecl->getAccess()); in ActOnTag()
13101 if (PrevDecl) in ActOnTag()
13102 mergeDeclAttributes(New, PrevDecl); in ActOnTag()
13388 NamedDecl *PrevDecl = nullptr; in HandleField() local
13394 PrevDecl = Previous.getAsSingle<NamedDecl>(); in HandleField()
13398 PrevDecl = Previous.getRepresentativeDecl(); in HandleField()
13408 if (PrevDecl && PrevDecl->isTemplateParameter()) { in HandleField()
13410 DiagnoseTemplateParameterShadow(D.getIdentifierLoc(), PrevDecl); in HandleField()
13412 PrevDecl = nullptr; in HandleField()
13415 if (PrevDecl && !isDeclInScope(PrevDecl, Record, S)) in HandleField()
13416 PrevDecl = nullptr; in HandleField()
13423 TSSL, AS, PrevDecl, &D); in HandleField()
13431 if (NewFD->isInvalidDecl() && PrevDecl) { in HandleField()
13458 AccessSpecifier AS, NamedDecl *PrevDecl, in CheckFieldDecl() argument
13571 if (PrevDecl && !isa<TagDecl>(PrevDecl)) { in CheckFieldDecl()
13573 Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in CheckFieldDecl()
13776 NamedDecl *PrevDecl = LookupSingleName(S, II, Loc, LookupMemberName, in ActOnIvar() local
13778 if (PrevDecl && isDeclInScope(PrevDecl, EnclosingContext, S) in ActOnIvar()
13779 && !isa<TagDecl>(PrevDecl)) { in ActOnIvar()
13781 Diag(PrevDecl->getLocation(), diag::note_previous_declaration); in ActOnIvar()
14488 NamedDecl *PrevDecl = LookupSingleName(S, II, IILoc, LookupOrdinaryName, in shouldSkipAnonEnumBody() local
14490 auto *PrevECD = dyn_cast_or_null<EnumConstantDecl>(PrevDecl); in shouldSkipAnonEnumBody()
14519 NamedDecl *PrevDecl = LookupSingleName(S, Id, IdLoc, LookupOrdinaryName, in ActOnEnumConstant() local
14521 if (PrevDecl && PrevDecl->isTemplateParameter()) { in ActOnEnumConstant()
14523 DiagnoseTemplateParameterShadow(IdLoc, PrevDecl); in ActOnEnumConstant()
14525 PrevDecl = nullptr; in ActOnEnumConstant()
14542 if (PrevDecl) { in ActOnEnumConstant()
14545 assert((getLangOpts().CPlusPlus || !isa<TagDecl>(PrevDecl)) && in ActOnEnumConstant()
14547 if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S) && in ActOnEnumConstant()
14548 shouldLinkPossiblyHiddenDecl(PrevDecl, New)) { in ActOnEnumConstant()
14549 if (isa<EnumConstantDecl>(PrevDecl)) in ActOnEnumConstant()
14553 Diag(PrevDecl->getLocation(), diag::note_previous_definition); in ActOnEnumConstant()
15182 NamedDecl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc, in ActOnPragmaRedefineExtname() local
15191 if (PrevDecl && (isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) { in ActOnPragmaRedefineExtname()
15192 if (isDeclExternC(PrevDecl)) in ActOnPragmaRedefineExtname()
15193 PrevDecl->addAttr(Attr); in ActOnPragmaRedefineExtname()
15195 Diag(PrevDecl->getLocation(), diag::warn_redefine_extname_not_applied) in ActOnPragmaRedefineExtname()
15196 << /*Variable*/(isa<FunctionDecl>(PrevDecl) ? 0 : 1) << PrevDecl; in ActOnPragmaRedefineExtname()
15205 Decl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc, LookupOrdinaryName); in ActOnPragmaWeakID() local
15207 if (PrevDecl) { in ActOnPragmaWeakID()
15208 PrevDecl->addAttr(WeakAttr::CreateImplicit(Context, PragmaLoc)); in ActOnPragmaWeakID()
15221 Decl *PrevDecl = LookupSingleName(TUScope, AliasName, AliasNameLoc, in ActOnPragmaWeakAlias() local
15225 if (PrevDecl && (isa<FunctionDecl>(PrevDecl) || isa<VarDecl>(PrevDecl))) { in ActOnPragmaWeakAlias()
15226 if (!PrevDecl->hasAttr<AliasAttr>()) in ActOnPragmaWeakAlias()
15227 if (NamedDecl *ND = dyn_cast<NamedDecl>(PrevDecl)) in ActOnPragmaWeakAlias()