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<
1014
1014
def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
1015
1015
def MicrosoftDefaultArgRedefinition :
1016
1016
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]>;
1018
1019
def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
1019
1020
def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
1020
1021
def MicrosoftEnumForwardReference :
Original file line number Diff line number Diff line change @@ -4210,7 +4210,7 @@ def err_ovl_no_viable_literal_operator : Error<
4210
4210
def err_template_param_shadow : Error<
4211
4211
"declaration of %0 shadows template parameter">;
4212
4212
def ext_template_param_shadow : ExtWarn<
4213
- err_template_param_shadow.Text>, InGroup<MicrosoftTemplate >;
4213
+ err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow >;
4214
4214
def note_template_param_here : Note<"template parameter is declared here">;
4215
4215
def warn_template_export_unsupported : Warning<
4216
4216
"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