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 @@ -1018,7 +1018,8 @@ def MicrosoftExplicitConstructorCall : DiagGroup<
1018
1018
def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
1019
1019
def MicrosoftDefaultArgRedefinition :
1020
1020
DiagGroup<"microsoft-default-arg-redefinition">;
1021
- def MicrosoftTemplate : DiagGroup<"microsoft-template">;
1021
+ def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">;
1022
+ def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>;
1022
1023
def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
1023
1024
def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
1024
1025
def MicrosoftEnumForwardReference :
Original file line number Diff line number Diff line change @@ -4273,7 +4273,7 @@ def err_ovl_no_viable_literal_operator : Error<
4273
4273
def err_template_param_shadow : Error<
4274
4274
"declaration of %0 shadows template parameter">;
4275
4275
def ext_template_param_shadow : ExtWarn<
4276
- err_template_param_shadow.Text>, InGroup<MicrosoftTemplate >;
4276
+ err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow >;
4277
4277
def note_template_param_here : Note<"template parameter is declared here">;
4278
4278
def warn_template_export_unsupported : Warning<
4279
4279
"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