mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-08 00:52:54 +00:00
Put microsoft template parameter shadow warning behind separate flag (PR44794)
Differential revision: https://reviews.llvm.org/D75121
This commit is contained in:
parent
0aec4b418e
commit
41a6612ea8
@ -1018,7 +1018,8 @@ def MicrosoftExplicitConstructorCall : DiagGroup<
|
||||
def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
|
||||
def MicrosoftDefaultArgRedefinition :
|
||||
DiagGroup<"microsoft-default-arg-redefinition">;
|
||||
def MicrosoftTemplate : DiagGroup<"microsoft-template">;
|
||||
def MicrosoftTemplateShadow : DiagGroup<"microsoft-template-shadow">;
|
||||
def MicrosoftTemplate : DiagGroup<"microsoft-template", [MicrosoftTemplateShadow]>;
|
||||
def MicrosoftInconsistentDllImport : DiagGroup<"inconsistent-dllimport">;
|
||||
def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
|
||||
def MicrosoftEnumForwardReference :
|
||||
|
@ -4273,7 +4273,7 @@ def err_ovl_no_viable_literal_operator : Error<
|
||||
def err_template_param_shadow : Error<
|
||||
"declaration of %0 shadows template parameter">;
|
||||
def ext_template_param_shadow : ExtWarn<
|
||||
err_template_param_shadow.Text>, InGroup<MicrosoftTemplate>;
|
||||
err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow>;
|
||||
def note_template_param_here : Note<"template parameter is declared here">;
|
||||
def warn_template_export_unsupported : Warning<
|
||||
"exported templates are unsupported">;
|
||||
|
11
clang/test/SemaCXX/microsoft-template-shadow.cpp
Normal file
11
clang/test/SemaCXX/microsoft-template-shadow.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -verify -fms-compatibility -Wno-microsoft -Wmicrosoft-template-shadow
|
||||
|
||||
template <typename T> // expected-note {{template parameter is declared here}}
|
||||
struct Outmost {
|
||||
template <typename T> // expected-warning {{declaration of 'T' shadows template parameter}}
|
||||
struct Inner {
|
||||
void f() {
|
||||
T *var;
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user