Lines Matching refs:ShadowedDecl
5776 NamedDecl *ShadowedDecl = getShadowedDeclaration(NewTD, Previous); in ActOnTypedefNameDecl() local
5788 if (ShadowedDecl && !Redeclaration) in ActOnTypedefNameDecl()
5789 CheckShadow(NewTD, ShadowedDecl, Previous); in ActOnTypedefNameDecl()
6790 NamedDecl *ShadowedDecl = D.getCXXScopeSpec().isEmpty() in ActOnVariableDeclarator() local
6869 if (ShadowedDecl && !D.isRedeclaration()) in ActOnVariableDeclarator()
6870 CheckShadow(NewVD, ShadowedDecl, Previous); in ActOnVariableDeclarator()
6937 static ShadowedDeclKind computeShadowedDeclKind(const NamedDecl *ShadowedDecl, in computeShadowedDeclKind() argument
6939 if (isa<TypeAliasDecl>(ShadowedDecl)) in computeShadowedDeclKind()
6941 else if (isa<TypedefDecl>(ShadowedDecl)) in computeShadowedDeclKind()
6944 return isa<FieldDecl>(ShadowedDecl) ? SDK_Field : SDK_StaticMember; in computeShadowedDeclKind()
6981 NamedDecl *ShadowedDecl = R.getFoundDecl(); in getShadowedDeclaration() local
6982 return isa<VarDecl>(ShadowedDecl) || isa<FieldDecl>(ShadowedDecl) in getShadowedDeclaration()
6983 ? ShadowedDecl in getShadowedDeclaration()
6998 NamedDecl *ShadowedDecl = R.getFoundDecl(); in getShadowedDeclaration() local
6999 return isa<TypedefNameDecl>(ShadowedDecl) ? ShadowedDecl : nullptr; in getShadowedDeclaration()
7011 void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, in CheckShadow() argument
7015 if (FieldDecl *FD = dyn_cast<FieldDecl>(ShadowedDecl)) { in CheckShadow()
7032 if (VarDecl *shadowedVar = dyn_cast<VarDecl>(ShadowedDecl)) in CheckShadow()
7038 ShadowedDecl = I; in CheckShadow()
7043 DeclContext *OldDC = ShadowedDecl->getDeclContext()->getRedeclContext(); in CheckShadow()
7047 if (isa<VarDecl>(D) && isa<VarDecl>(ShadowedDecl) && NewDC && in CheckShadow()
7055 CaptureLoc = getCaptureLocation(LSI, cast<VarDecl>(ShadowedDecl)); in CheckShadow()
7063 {cast<VarDecl>(D), cast<VarDecl>(ShadowedDecl)}); in CheckShadow()
7068 if (cast<VarDecl>(ShadowedDecl)->hasLocalStorage()) { in CheckShadow()
7105 ShadowedDeclKind Kind = computeShadowedDeclKind(ShadowedDecl, OldDC); in CheckShadow()
7110 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in CheckShadow()
7117 const VarDecl *ShadowedDecl = Shadow.ShadowedDecl; in DiagnoseShadowingLambdaDecls() local
7119 SourceLocation CaptureLoc = getCaptureLocation(LSI, ShadowedDecl); in DiagnoseShadowingLambdaDecls()
7120 const DeclContext *OldDC = ShadowedDecl->getDeclContext(); in DiagnoseShadowingLambdaDecls()
7125 << computeShadowedDeclKind(ShadowedDecl, OldDC) << OldDC; in DiagnoseShadowingLambdaDecls()
7129 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in DiagnoseShadowingLambdaDecls()
7141 if (NamedDecl *ShadowedDecl = getShadowedDeclaration(D, R)) in CheckShadow() local
7142 CheckShadow(D, ShadowedDecl, R); in CheckShadow()
7159 const NamedDecl *ShadowedDecl = I->second; in CheckShadowingDeclModification() local
7160 const DeclContext *OldDC = ShadowedDecl->getDeclContext(); in CheckShadowingDeclModification()
7163 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in CheckShadowingDeclModification()