================ @@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, } TemplateParameterList *TemplateParams = TemplateParamLists[0]; + // Check shadowing of a template parameter name + for (NamedDecl *TP : TemplateParams->asArray()) { + if (NameInfo.getName() == TP->getDeclName()) { + DiagnoseTemplateParameterShadow(Name.StartLocation, TP); + return nullptr; + } + } + ---------------- zyn0217 wrote:
@cor3ntin @erichkeane I don't understand why we were skipping past template parameter scopes even prior to @sdkrystian's patch. It doesn't seem very right for this case. https://github.com/llvm/llvm-project/commit/c1d8d0aa156f651ee48414fa002e9608d6998763#diff-9ced4fa47ee2b9c03b6996ce89a1d131c0f5b71013993bc582209f50d5e934daL13519 https://github.com/llvm/llvm-project/pull/123533 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits