File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1014,7 +1014,8 @@ def MicrosoftExplicitConstructorCall : DiagGroup<
10141014def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
10151015def MicrosoftDefaultArgRedefinition :
10161016 DiagGroup<"microsoft-default-arg-redefinition">;
1017- def MicrosoftTemplate : DiagGroup<"microsoft-template">;
1017+ def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">;
1018+ def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>;
10181019def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
10191020def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
10201021def MicrosoftEnumForwardReference :
Original file line number Diff line number Diff line change @@ -4210,7 +4210,7 @@ def err_ovl_no_viable_literal_operator : Error<
42104210def err_template_param_shadow : Error<
42114211 "declaration of %0 shadows template parameter">;
42124212def ext_template_param_shadow : ExtWarn<
4213- err_template_param_shadow.Text>, InGroup<MicrosoftTemplate >;
4213+ err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow >;
42144214def note_template_param_here : Note<"template parameter is declared here">;
42154215def warn_template_export_unsupported : Warning<
42164216 "exported templates are unsupported">;
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -verify -fms-compatibility -Wno-microsoft -Wmicrosoft-template-shadow
2+
3+ template <typename T> // expected-note {{template parameter is declared here}}
4+ struct Outmost {
5+ template <typename T> // expected-warning {{declaration of 'T' shadows template parameter}}
6+ struct Inner {
7+ void f () {
8+ T *var;
9+ }
10+ };
11+ };
You can’t perform that action at this time.
0 commit comments