Lines Matching refs:ShadowedDecl

6861   NamedDecl *ShadowedDecl = getShadowedDeclaration(NewTD, Previous);  in ActOnTypedefNameDecl()  local
6875 if (ShadowedDecl && !Redeclaration) in ActOnTypedefNameDecl()
6876 CheckShadow(NewTD, ShadowedDecl, Previous); in ActOnTypedefNameDecl()
8117 NamedDecl *ShadowedDecl = D.getCXXScopeSpec().isEmpty() in ActOnVariableDeclarator() local
8203 if (!IsPlaceholderVariable && ShadowedDecl && !D.isRedeclaration()) in ActOnVariableDeclarator()
8204 CheckShadow(NewVD, ShadowedDecl, Previous); in ActOnVariableDeclarator()
8276 static ShadowedDeclKind computeShadowedDeclKind(const NamedDecl *ShadowedDecl, in computeShadowedDeclKind() argument
8278 if (isa<TypeAliasDecl>(ShadowedDecl)) in computeShadowedDeclKind()
8280 else if (isa<TypedefDecl>(ShadowedDecl)) in computeShadowedDeclKind()
8282 else if (isa<BindingDecl>(ShadowedDecl)) in computeShadowedDeclKind()
8285 return isa<FieldDecl>(ShadowedDecl) ? SDK_Field : SDK_StaticMember; in computeShadowedDeclKind()
8322 NamedDecl *ShadowedDecl = R.getFoundDecl(); in getShadowedDeclaration() local
8323 return isa<VarDecl, FieldDecl, BindingDecl>(ShadowedDecl) ? ShadowedDecl in getShadowedDeclaration()
8338 NamedDecl *ShadowedDecl = R.getFoundDecl(); in getShadowedDeclaration() local
8339 return isa<TypedefNameDecl>(ShadowedDecl) ? ShadowedDecl : nullptr; in getShadowedDeclaration()
8349 NamedDecl *ShadowedDecl = R.getFoundDecl(); in getShadowedDeclaration() local
8350 return isa<VarDecl, FieldDecl, BindingDecl>(ShadowedDecl) ? ShadowedDecl in getShadowedDeclaration()
8363 void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, in CheckShadow() argument
8367 if (FieldDecl *FD = dyn_cast<FieldDecl>(ShadowedDecl)) { in CheckShadow()
8384 if (VarDecl *shadowedVar = dyn_cast<VarDecl>(ShadowedDecl)) in CheckShadow()
8390 ShadowedDecl = I; in CheckShadow()
8395 DeclContext *OldDC = ShadowedDecl->getDeclContext()->getRedeclContext(); in CheckShadow()
8402 if (const auto *VD = dyn_cast<VarDecl>(ShadowedDecl)) { in CheckShadow()
8420 if (isa<FieldDecl>(ShadowedDecl)) { in CheckShadow()
8427 ->ShadowingDecls.push_back({D, ShadowedDecl}); in CheckShadow()
8431 if (const auto *VD = dyn_cast<VarDecl>(ShadowedDecl); in CheckShadow()
8450 if (ShadowedDecl->isPlaceholderVar(getLangOpts())) in CheckShadow()
8471 ShadowedDeclKind Kind = computeShadowedDeclKind(ShadowedDecl, OldDC); in CheckShadow()
8476 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in CheckShadow()
8483 const NamedDecl *ShadowedDecl = Shadow.ShadowedDecl; in DiagnoseShadowingLambdaDecls() local
8485 const DeclContext *OldDC = ShadowedDecl->getDeclContext(); in DiagnoseShadowingLambdaDecls()
8486 if (const auto *VD = dyn_cast<VarDecl>(ShadowedDecl)) { in DiagnoseShadowingLambdaDecls()
8492 << computeShadowedDeclKind(ShadowedDecl, OldDC) << OldDC; in DiagnoseShadowingLambdaDecls()
8496 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in DiagnoseShadowingLambdaDecls()
8497 } else if (isa<FieldDecl>(ShadowedDecl)) { in DiagnoseShadowingLambdaDecls()
8502 << computeShadowedDeclKind(ShadowedDecl, OldDC) << OldDC; in DiagnoseShadowingLambdaDecls()
8503 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in DiagnoseShadowingLambdaDecls()
8516 if (NamedDecl *ShadowedDecl = getShadowedDeclaration(D, R)) in CheckShadow() local
8517 CheckShadow(D, ShadowedDecl, R); in CheckShadow()
8534 const NamedDecl *ShadowedDecl = I->second; in CheckShadowingDeclModification() local
8535 const DeclContext *OldDC = ShadowedDecl->getDeclContext(); in CheckShadowingDeclModification()
8538 Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration); in CheckShadowingDeclModification()