================
@@ -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;
+ }
+ }
+
----------------
MagentaTreehouse wrote:
Code to skip up scope was originally added here:
https://github.com/llvm/llvm-project/commit/3f1b5d077b7e68c0c801a56f17b05dab96f7f992#diff-9ced4fa47ee2b9c03b6996ce89a1d131c0f5b71013993bc582209f50d5e934daR4713-R4715
https://github.com/llvm/llvm-project/pull/123533
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits