Split -Wmicrosoft into many specific warnings.
Also move "pragma comment" warning from -Wmicrosoft to -Wignored-pragmas. -Wmicrosoft currently covers many different areas, some more useful than others. Split it into many targeted flags, so that projects can choose to enable only a subset of these warnings. This is also useful for incrementally fixing and turning on these warnings. -Wno-microsoft still disables all these warnings, and -Wmicrosoft still enables them all. After this change, it's possible to pass `-Wno-microsoft -Wmicrosoft-unqualified-friend` to only enable -Wmicrosoft-unqualified-friend, and `-Wmicrosoft -Wno-microsoft-unqualified-friend` to enable all other Microsoft warnings. I put all the template-related warnings behind -Wmicrosoft-template; if that turns out to be too coarse we can make that finer later on. (In practice, I haven't seen the template-related warnings fire frequently.) Reviewed at http://reviews.llvm.org/D11504 llvm-svn: 243371
This commit is contained in:
		
							parent
							
								
									e62bda70aa
								
							
						
					
					
						commit
						cee4d85faf
					
				| 
						 | 
					@ -715,8 +715,45 @@ def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
 | 
				
			||||||
// A warning group for warnings about code that clang accepts but gcc doesn't.
 | 
					// A warning group for warnings about code that clang accepts but gcc doesn't.
 | 
				
			||||||
def GccCompat : DiagGroup<"gcc-compat">;
 | 
					def GccCompat : DiagGroup<"gcc-compat">;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// A warning group for warnings about Microsoft extensions.
 | 
					// Warnings for Microsoft extensions.
 | 
				
			||||||
def Microsoft : DiagGroup<"microsoft">;
 | 
					def MicrosoftCharize : DiagGroup<"microsoft-charize">;
 | 
				
			||||||
 | 
					def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
 | 
				
			||||||
 | 
					def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
 | 
				
			||||||
 | 
					def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
 | 
				
			||||||
 | 
					def MicrosoftUnqualifiedFriend : DiagGroup<"microsoft-unqualified-friend">;
 | 
				
			||||||
 | 
					def MicrosoftExceptionSpec : DiagGroup<"microsoft-exception-spec">;
 | 
				
			||||||
 | 
					def MicrosoftUsingDecl : DiagGroup<"microsoft-using-decl">;
 | 
				
			||||||
 | 
					def MicrosoftMutableReference : DiagGroup<"microsoft-mutable-reference">;
 | 
				
			||||||
 | 
					def MicrosoftPureDefinition : DiagGroup<"microsoft-pure-definition">;
 | 
				
			||||||
 | 
					def MicrosoftUnionMemberReference : DiagGroup<
 | 
				
			||||||
 | 
					    "microsoft-union-member-reference">;
 | 
				
			||||||
 | 
					def MicrosoftExplicitConstructorCall : DiagGroup<
 | 
				
			||||||
 | 
					    "microsoft-explicit-constructor-call">;
 | 
				
			||||||
 | 
					def MicrosoftEnumValue : DiagGroup<"microsoft-enum-value">;
 | 
				
			||||||
 | 
					def MicrosoftDefaultArgRedefinition :
 | 
				
			||||||
 | 
					    DiagGroup<"microsoft-default-arg-redefinition">;
 | 
				
			||||||
 | 
					def MicrosoftTemplate : DiagGroup<"microsoft-template">;
 | 
				
			||||||
 | 
					def MicrosoftRedeclareStatic : DiagGroup<"microsoft-redeclare-static">;
 | 
				
			||||||
 | 
					def MicrosoftEnumForwardReference :
 | 
				
			||||||
 | 
					    DiagGroup<"microsoft-enum-forward-reference">;
 | 
				
			||||||
 | 
					def MicrosoftGoto : DiagGroup<"microsoft-goto">;
 | 
				
			||||||
 | 
					def MicrosoftFlexibleArray : DiagGroup<"microsoft-flexible-array">;
 | 
				
			||||||
 | 
					def MicrosoftExtraQualification : DiagGroup<"microsoft-extra-qualification">;
 | 
				
			||||||
 | 
					def MicrosoftCast : DiagGroup<"microsoft-cast">;
 | 
				
			||||||
 | 
					def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
 | 
				
			||||||
 | 
					def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
 | 
				
			||||||
 | 
					def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Warnings group for warnings about Microsoft extensions.
 | 
				
			||||||
 | 
					def Microsoft : DiagGroup<"microsoft",
 | 
				
			||||||
 | 
					    [MicrosoftCharize, MicrosoftCppMacro, MicrosoftFixedEnum, MicrosoftSealed,
 | 
				
			||||||
 | 
					     MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec, MicrosoftUsingDecl,
 | 
				
			||||||
 | 
					     MicrosoftMutableReference, MicrosoftPureDefinition,
 | 
				
			||||||
 | 
					     MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
 | 
				
			||||||
 | 
					     MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
 | 
				
			||||||
 | 
					     MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
 | 
				
			||||||
 | 
					     MicrosoftFlexibleArray, MicrosoftExtraQualification, MicrosoftCast,
 | 
				
			||||||
 | 
					     MicrosoftConstInit, MicrosoftVoidPseudoDtor, MicrosoftAnonTag]>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
 | 
					def ObjCNonUnifiedException : DiagGroup<"objc-nonunified-exceptions">;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,8 +57,9 @@ def warn_cxx98_compat_no_newline_eof : Warning<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ext_dollar_in_identifier : Extension<"'$' in identifier">,
 | 
					def ext_dollar_in_identifier : Extension<"'$' in identifier">,
 | 
				
			||||||
  InGroup<DiagGroup<"dollar-in-identifier-extension">>;
 | 
					  InGroup<DiagGroup<"dollar-in-identifier-extension">>;
 | 
				
			||||||
def ext_charize_microsoft : Extension<"charizing operator #@ is a Microsoft extension">,
 | 
					def ext_charize_microsoft : Extension<
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  "charizing operator #@ is a Microsoft extension">,
 | 
				
			||||||
 | 
					  InGroup<MicrosoftCharize>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ext_token_used : Extension<"extension used">,
 | 
					def ext_token_used : Extension<"extension used">,
 | 
				
			||||||
  InGroup<DiagGroup<"language-extension-token">>;
 | 
					  InGroup<DiagGroup<"language-extension-token">>;
 | 
				
			||||||
| 
						 | 
					@ -510,7 +511,7 @@ def ext_pp_bad_paste_ms : ExtWarn<
 | 
				
			||||||
def err_pp_operator_used_as_macro_name : Error<
 | 
					def err_pp_operator_used_as_macro_name : Error<
 | 
				
			||||||
  "C++ operator %0 (aka %1) used as a macro name">;
 | 
					  "C++ operator %0 (aka %1) used as a macro name">;
 | 
				
			||||||
def ext_pp_operator_used_as_macro_name : Extension<
 | 
					def ext_pp_operator_used_as_macro_name : Extension<
 | 
				
			||||||
  "C++ operator %0 (aka %1) used as a macro name">, InGroup<Microsoft>;
 | 
					  err_pp_operator_used_as_macro_name.Text>, InGroup<MicrosoftCppMacro>;
 | 
				
			||||||
def err_pp_illegal_floating_literal : Error<
 | 
					def err_pp_illegal_floating_literal : Error<
 | 
				
			||||||
  "floating point literal in preprocessor expression">;
 | 
					  "floating point literal in preprocessor expression">;
 | 
				
			||||||
def err_pp_line_requires_integer : Error<
 | 
					def err_pp_line_requires_integer : Error<
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,7 +101,7 @@ def ext_cxx11_enum_fixed_underlying_type : Extension<
 | 
				
			||||||
  InGroup<CXX11>;
 | 
					  InGroup<CXX11>;
 | 
				
			||||||
def ext_c_enum_fixed_underlying_type : Extension<
 | 
					def ext_c_enum_fixed_underlying_type : Extension<
 | 
				
			||||||
  "enumeration types with a fixed underlying type are a Microsoft extension">,
 | 
					  "enumeration types with a fixed underlying type are a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftFixedEnum>;
 | 
				
			||||||
def warn_cxx98_compat_enum_fixed_underlying_type : Warning<
 | 
					def warn_cxx98_compat_enum_fixed_underlying_type : Warning<
 | 
				
			||||||
  "enumeration types with a fixed underlying type are incompatible with C++98">,
 | 
					  "enumeration types with a fixed underlying type are incompatible with C++98">,
 | 
				
			||||||
  InGroup<CXX98Compat>, DefaultIgnore;
 | 
					  InGroup<CXX98Compat>, DefaultIgnore;
 | 
				
			||||||
| 
						 | 
					@ -508,7 +508,7 @@ def note_missing_end_of_definition_before : Note<
 | 
				
			||||||
  "still within definition of %q0 here">;
 | 
					  "still within definition of %q0 here">;
 | 
				
			||||||
def ext_ellipsis_exception_spec : Extension<
 | 
					def ext_ellipsis_exception_spec : Extension<
 | 
				
			||||||
  "exception specification of '...' is a Microsoft extension">,
 | 
					  "exception specification of '...' is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftExceptionSpec>;
 | 
				
			||||||
def err_dynamic_and_noexcept_specification : Error<
 | 
					def err_dynamic_and_noexcept_specification : Error<
 | 
				
			||||||
  "cannot have both throw() and noexcept() clause on the same function">;
 | 
					  "cannot have both throw() and noexcept() clause on the same function">;
 | 
				
			||||||
def err_except_spec_unparsed : Error<
 | 
					def err_except_spec_unparsed : Error<
 | 
				
			||||||
| 
						 | 
					@ -780,7 +780,7 @@ def err_override_control_interface : Error<
 | 
				
			||||||
  "'%0' keyword not permitted with interface types">;
 | 
					  "'%0' keyword not permitted with interface types">;
 | 
				
			||||||
def ext_ms_sealed_keyword : ExtWarn<
 | 
					def ext_ms_sealed_keyword : ExtWarn<
 | 
				
			||||||
  "'sealed' keyword is a Microsoft extension">,
 | 
					  "'sealed' keyword is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftSealed>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def err_access_specifier_interface : Error<
 | 
					def err_access_specifier_interface : Error<
 | 
				
			||||||
  "interface types cannot specify '%select{private|protected}0' access">;
 | 
					  "interface types cannot specify '%select{private|protected}0' access">;
 | 
				
			||||||
| 
						 | 
					@ -941,7 +941,7 @@ def err_pragma_comment_malformed : Error<
 | 
				
			||||||
def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
 | 
					def err_pragma_comment_unknown_kind : Error<"unknown kind of pragma comment">;
 | 
				
			||||||
// PS4 recognizes only #pragma comment(lib)
 | 
					// PS4 recognizes only #pragma comment(lib)
 | 
				
			||||||
def warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
 | 
					def warn_pragma_comment_ignored : Warning<"'#pragma comment %0' ignored">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<IgnoredPragmas>;
 | 
				
			||||||
// - #pragma detect_mismatch
 | 
					// - #pragma detect_mismatch
 | 
				
			||||||
def err_pragma_detect_mismatch_malformed : Error<
 | 
					def err_pragma_detect_mismatch_malformed : Error<
 | 
				
			||||||
  "pragma detect_mismatch is malformed; it requires two comma-separated "
 | 
					  "pragma detect_mismatch is malformed; it requires two comma-separated "
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1058,7 +1058,7 @@ def warn_template_qualified_friend_ignored : Warning<
 | 
				
			||||||
def ext_friend_tag_redecl_outside_namespace : ExtWarn<
 | 
					def ext_friend_tag_redecl_outside_namespace : ExtWarn<
 | 
				
			||||||
  "unqualified friend declaration referring to type outside of the nearest "
 | 
					  "unqualified friend declaration referring to type outside of the nearest "
 | 
				
			||||||
  "enclosing namespace is a Microsoft extension; add a nested name specifier">,
 | 
					  "enclosing namespace is a Microsoft extension; add a nested name specifier">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftUnqualifiedFriend>;
 | 
				
			||||||
def err_pure_friend : Error<"friend declaration cannot have a pure-specifier">;
 | 
					def err_pure_friend : Error<"friend declaration cannot have a pure-specifier">;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def err_invalid_member_in_interface : Error<
 | 
					def err_invalid_member_in_interface : Error<
 | 
				
			||||||
| 
						 | 
					@ -1138,12 +1138,12 @@ def err_rref_in_exception_spec : Error<
 | 
				
			||||||
def err_mismatched_exception_spec : Error<
 | 
					def err_mismatched_exception_spec : Error<
 | 
				
			||||||
  "exception specification in declaration does not match previous declaration">;
 | 
					  "exception specification in declaration does not match previous declaration">;
 | 
				
			||||||
def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>,
 | 
					def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftExceptionSpec>;
 | 
				
			||||||
def err_override_exception_spec : Error<
 | 
					def err_override_exception_spec : Error<
 | 
				
			||||||
  "exception specification of overriding function is more lax than "
 | 
					  "exception specification of overriding function is more lax than "
 | 
				
			||||||
  "base version">;
 | 
					  "base version">;
 | 
				
			||||||
def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>,
 | 
					def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftExceptionSpec>;
 | 
				
			||||||
def err_incompatible_exception_specs : Error<
 | 
					def err_incompatible_exception_specs : Error<
 | 
				
			||||||
  "target exception specification is not superset of source">;
 | 
					  "target exception specification is not superset of source">;
 | 
				
			||||||
def err_deep_exception_specs_differ : Error<
 | 
					def err_deep_exception_specs_differ : Error<
 | 
				
			||||||
| 
						 | 
					@ -1163,7 +1163,7 @@ def err_access : Error<
 | 
				
			||||||
def ext_ms_using_declaration_inaccessible : ExtWarn<
 | 
					def ext_ms_using_declaration_inaccessible : ExtWarn<
 | 
				
			||||||
  "using declaration referring to inaccessible member '%0' (which refers "
 | 
					  "using declaration referring to inaccessible member '%0' (which refers "
 | 
				
			||||||
  "to accessible member '%1') is a Microsoft compatibility extension">,
 | 
					  "to accessible member '%1') is a Microsoft compatibility extension">,
 | 
				
			||||||
    AccessControl, InGroup<Microsoft>;
 | 
					    AccessControl, InGroup<MicrosoftUsingDecl>;
 | 
				
			||||||
def err_access_ctor : Error<
 | 
					def err_access_ctor : Error<
 | 
				
			||||||
  "calling a %select{private|protected}0 constructor of class %2">, 
 | 
					  "calling a %select{private|protected}0 constructor of class %2">, 
 | 
				
			||||||
  AccessControl;
 | 
					  AccessControl;
 | 
				
			||||||
| 
						 | 
					@ -1269,7 +1269,7 @@ def err_mutable_function : Error<"'mutable' cannot be applied to functions">;
 | 
				
			||||||
def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
 | 
					def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
 | 
				
			||||||
def ext_mutable_reference : ExtWarn<
 | 
					def ext_mutable_reference : ExtWarn<
 | 
				
			||||||
  "'mutable' on a reference type is a Microsoft extension">,
 | 
					  "'mutable' on a reference type is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftMutableReference>;
 | 
				
			||||||
def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
 | 
					def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
 | 
				
			||||||
def err_mutable_nonmember : Error<
 | 
					def err_mutable_nonmember : Error<
 | 
				
			||||||
  "'mutable' can only be applied to member variables">;
 | 
					  "'mutable' can only be applied to member variables">;
 | 
				
			||||||
| 
						 | 
					@ -1305,7 +1305,7 @@ def err_non_virtual_pure : Error<
 | 
				
			||||||
  "%0 is not virtual and cannot be declared pure">;
 | 
					  "%0 is not virtual and cannot be declared pure">;
 | 
				
			||||||
def ext_pure_function_definition : ExtWarn<
 | 
					def ext_pure_function_definition : ExtWarn<
 | 
				
			||||||
  "function definition with pure-specifier is a Microsoft extension">,
 | 
					  "function definition with pure-specifier is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftPureDefinition>;
 | 
				
			||||||
def err_implicit_object_parameter_init : Error<
 | 
					def err_implicit_object_parameter_init : Error<
 | 
				
			||||||
  "cannot initialize object parameter of type %0 with an expression "
 | 
					  "cannot initialize object parameter of type %0 with an expression "
 | 
				
			||||||
  "of type %1">;
 | 
					  "of type %1">;
 | 
				
			||||||
| 
						 | 
					@ -1384,7 +1384,7 @@ def warn_cxx98_compat_static_data_member_in_union : Warning<
 | 
				
			||||||
  InGroup<CXX98Compat>, DefaultIgnore;
 | 
					  InGroup<CXX98Compat>, DefaultIgnore;
 | 
				
			||||||
def ext_union_member_of_reference_type : ExtWarn<
 | 
					def ext_union_member_of_reference_type : ExtWarn<
 | 
				
			||||||
  "union member %0 has reference type %1, which is a Microsoft extension">,
 | 
					  "union member %0 has reference type %1, which is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftUnionMemberReference>;
 | 
				
			||||||
def err_union_member_of_reference_type : Error<
 | 
					def err_union_member_of_reference_type : Error<
 | 
				
			||||||
  "union member %0 has reference type %1">;
 | 
					  "union member %0 has reference type %1">;
 | 
				
			||||||
def ext_anonymous_struct_union_qualified : Extension<
 | 
					def ext_anonymous_struct_union_qualified : Extension<
 | 
				
			||||||
| 
						 | 
					@ -1439,7 +1439,8 @@ def warn_no_constructor_for_refconst : Warning<
 | 
				
			||||||
def note_refconst_member_not_initialized : Note<
 | 
					def note_refconst_member_not_initialized : Note<
 | 
				
			||||||
  "%select{const|reference}0 member %1 will never be initialized">;
 | 
					  "%select{const|reference}0 member %1 will never be initialized">;
 | 
				
			||||||
def ext_ms_explicit_constructor_call : ExtWarn<
 | 
					def ext_ms_explicit_constructor_call : ExtWarn<
 | 
				
			||||||
  "explicit constructor calls are a Microsoft extension">, InGroup<Microsoft>;
 | 
					  "explicit constructor calls are a Microsoft extension">,
 | 
				
			||||||
 | 
					  InGroup<MicrosoftExplicitConstructorCall>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// C++ destructors
 | 
					// C++ destructors
 | 
				
			||||||
def err_destructor_not_member : Error<
 | 
					def err_destructor_not_member : Error<
 | 
				
			||||||
| 
						 | 
					@ -1770,7 +1771,7 @@ def err_enumerator_too_large : Error<
 | 
				
			||||||
  "enumerator value is not representable in the underlying type %0">;
 | 
					  "enumerator value is not representable in the underlying type %0">;
 | 
				
			||||||
def ext_enumerator_too_large : ExtWarn<
 | 
					def ext_enumerator_too_large : ExtWarn<
 | 
				
			||||||
  "enumerator value is not representable in the underlying type %0">,
 | 
					  "enumerator value is not representable in the underlying type %0">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftEnumValue>;
 | 
				
			||||||
def err_enumerator_wrapped : Error<
 | 
					def err_enumerator_wrapped : Error<
 | 
				
			||||||
  "enumerator value %0 is not representable in the underlying type %1">;
 | 
					  "enumerator value %0 is not representable in the underlying type %1">;
 | 
				
			||||||
def err_enum_redeclare_type_mismatch : Error<
 | 
					def err_enum_redeclare_type_mismatch : Error<
 | 
				
			||||||
| 
						 | 
					@ -2853,7 +2854,8 @@ def err_param_default_argument : Error<
 | 
				
			||||||
def err_param_default_argument_redefinition : Error<
 | 
					def err_param_default_argument_redefinition : Error<
 | 
				
			||||||
  "redefinition of default argument">;
 | 
					  "redefinition of default argument">;
 | 
				
			||||||
def ext_param_default_argument_redefinition : ExtWarn<
 | 
					def ext_param_default_argument_redefinition : ExtWarn<
 | 
				
			||||||
  "redefinition of default argument">, InGroup<Microsoft>;
 | 
					  err_param_default_argument_redefinition.Text>,
 | 
				
			||||||
 | 
					  InGroup<MicrosoftDefaultArgRedefinition>;
 | 
				
			||||||
def err_param_default_argument_missing : Error<
 | 
					def err_param_default_argument_missing : Error<
 | 
				
			||||||
  "missing default argument on parameter">;
 | 
					  "missing default argument on parameter">;
 | 
				
			||||||
def err_param_default_argument_missing_name : Error<
 | 
					def err_param_default_argument_missing_name : Error<
 | 
				
			||||||
| 
						 | 
					@ -3345,11 +3347,12 @@ def note_template_decl_here : Note<"template is declared here">;
 | 
				
			||||||
def err_template_arg_must_be_type : Error<
 | 
					def err_template_arg_must_be_type : Error<
 | 
				
			||||||
  "template argument for template type parameter must be a type">;
 | 
					  "template argument for template type parameter must be a type">;
 | 
				
			||||||
def err_template_arg_must_be_type_suggest : Error<
 | 
					def err_template_arg_must_be_type_suggest : Error<
 | 
				
			||||||
  "template argument for template type parameter must be a type; did you forget 'typename'?">;
 | 
					  "template argument for template type parameter must be a type; "
 | 
				
			||||||
 | 
					  "did you forget 'typename'?">;
 | 
				
			||||||
def ext_ms_template_type_arg_missing_typename : ExtWarn<
 | 
					def ext_ms_template_type_arg_missing_typename : ExtWarn<
 | 
				
			||||||
  "template argument for template type parameter must be a type; "
 | 
					  "template argument for template type parameter must be a type; "
 | 
				
			||||||
  "omitted 'typename' is a Microsoft extension">,
 | 
					  "omitted 'typename' is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def err_template_arg_must_be_expr : Error<
 | 
					def err_template_arg_must_be_expr : Error<
 | 
				
			||||||
  "template argument for non-type template parameter must be an expression">;
 | 
					  "template argument for non-type template parameter must be an expression">;
 | 
				
			||||||
def err_template_arg_nontype_ambig : Error<
 | 
					def err_template_arg_nontype_ambig : Error<
 | 
				
			||||||
| 
						 | 
					@ -3469,10 +3472,10 @@ def err_pointer_to_member_oper_value_classify: Error<
 | 
				
			||||||
  "%select{rvalue|lvalue}1">;
 | 
					  "%select{rvalue|lvalue}1">;
 | 
				
			||||||
def ext_ms_deref_template_argument: ExtWarn<
 | 
					def ext_ms_deref_template_argument: ExtWarn<
 | 
				
			||||||
  "non-type template argument containing a dereference operation is a "
 | 
					  "non-type template argument containing a dereference operation is a "
 | 
				
			||||||
  "Microsoft extension">, InGroup<Microsoft>;
 | 
					  "Microsoft extension">, InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def ext_ms_delayed_template_argument: ExtWarn<
 | 
					def ext_ms_delayed_template_argument: ExtWarn<
 | 
				
			||||||
  "using the undeclared type %0 as a default template argument is a "
 | 
					  "using the undeclared type %0 as a default template argument is a "
 | 
				
			||||||
  "Microsoft extension">, InGroup<Microsoft>;
 | 
					  "Microsoft extension">, InGroup<MicrosoftTemplate>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// C++ template specialization
 | 
					// C++ template specialization
 | 
				
			||||||
def err_template_spec_unknown_kind : Error<
 | 
					def err_template_spec_unknown_kind : Error<
 | 
				
			||||||
| 
						 | 
					@ -3520,7 +3523,7 @@ def ext_ms_template_spec_redecl_out_of_scope: ExtWarn<
 | 
				
			||||||
  "variable template partial|function template|member "
 | 
					  "variable template partial|function template|member "
 | 
				
			||||||
  "function|static data member|member class|member enumeration}0 "
 | 
					  "function|static data member|member class|member enumeration}0 "
 | 
				
			||||||
  "specialization of %1 outside namespace enclosing %2 "
 | 
					  "specialization of %1 outside namespace enclosing %2 "
 | 
				
			||||||
  "is a Microsoft extension">, InGroup<Microsoft>;
 | 
					  "is a Microsoft extension">, InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def err_template_spec_redecl_global_scope : Error<
 | 
					def err_template_spec_redecl_global_scope : Error<
 | 
				
			||||||
  "%select{class template|class template partial|variable template|"
 | 
					  "%select{class template|class template partial|variable template|"
 | 
				
			||||||
  "variable template partial|function template|member "
 | 
					  "variable template partial|function template|member "
 | 
				
			||||||
| 
						 | 
					@ -3545,7 +3548,7 @@ def err_function_specialization_in_class : Error<
 | 
				
			||||||
  "cannot specialize a function %0 within class scope">;
 | 
					  "cannot specialize a function %0 within class scope">;
 | 
				
			||||||
def ext_function_specialization_in_class : ExtWarn<
 | 
					def ext_function_specialization_in_class : ExtWarn<
 | 
				
			||||||
  "explicit specialization of %0 within class scope is a Microsoft extension">,
 | 
					  "explicit specialization of %0 within class scope is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def ext_explicit_specialization_storage_class : ExtWarn<
 | 
					def ext_explicit_specialization_storage_class : ExtWarn<
 | 
				
			||||||
  "explicit specialization cannot have a storage class">;
 | 
					  "explicit specialization cannot have a storage class">;
 | 
				
			||||||
def err_explicit_specialization_inconsistent_storage_class : Error<
 | 
					def err_explicit_specialization_inconsistent_storage_class : Error<
 | 
				
			||||||
| 
						 | 
					@ -3706,7 +3709,7 @@ def err_explicit_instantiation_duplicate : Error<
 | 
				
			||||||
    "duplicate explicit instantiation of %0">;
 | 
					    "duplicate explicit instantiation of %0">;
 | 
				
			||||||
def ext_explicit_instantiation_duplicate : ExtWarn<
 | 
					def ext_explicit_instantiation_duplicate : ExtWarn<
 | 
				
			||||||
    "duplicate explicit instantiation of %0 ignored as a Microsoft extension">,
 | 
					    "duplicate explicit instantiation of %0 ignored as a Microsoft extension">,
 | 
				
			||||||
    InGroup<Microsoft>;
 | 
					    InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def note_previous_explicit_instantiation : Note<
 | 
					def note_previous_explicit_instantiation : Note<
 | 
				
			||||||
    "previous explicit instantiation is here">;
 | 
					    "previous explicit instantiation is here">;
 | 
				
			||||||
def ext_explicit_instantiation_after_specialization : Extension<
 | 
					def ext_explicit_instantiation_after_specialization : Extension<
 | 
				
			||||||
| 
						 | 
					@ -3791,10 +3794,11 @@ def err_invalid_var_template_spec_type : Error<"type %2 "
 | 
				
			||||||
  "partial specialization|redeclaration}0 of %1 does not match"
 | 
					  "partial specialization|redeclaration}0 of %1 does not match"
 | 
				
			||||||
  " expected type %3">;
 | 
					  " expected type %3">;
 | 
				
			||||||
def err_mismatched_exception_spec_explicit_instantiation : Error<
 | 
					def err_mismatched_exception_spec_explicit_instantiation : Error<
 | 
				
			||||||
  "exception specification in explicit instantiation does not match instantiated one">;
 | 
					  "exception specification in explicit instantiation does not match "
 | 
				
			||||||
 | 
					  "instantiated one">;
 | 
				
			||||||
def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
 | 
					def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
 | 
				
			||||||
  "exception specification in explicit instantiation does not match instantiated one">,
 | 
					  err_mismatched_exception_spec_explicit_instantiation.Text>,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftExceptionSpec>;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
// C++ typename-specifiers
 | 
					// C++ typename-specifiers
 | 
				
			||||||
def err_typename_nested_not_found : Error<"no type named %0 in %1">;
 | 
					def err_typename_nested_not_found : Error<"no type named %0 in %1">;
 | 
				
			||||||
| 
						 | 
					@ -3912,10 +3916,10 @@ def err_undeclared_var_use : Error<"use of undeclared identifier %0">;
 | 
				
			||||||
def ext_undeclared_unqual_id_with_dependent_base : ExtWarn<
 | 
					def ext_undeclared_unqual_id_with_dependent_base : ExtWarn<
 | 
				
			||||||
  "use of undeclared identifier %0; "
 | 
					  "use of undeclared identifier %0; "
 | 
				
			||||||
  "unqualified lookup into dependent bases of class template %1 is a Microsoft extension">,
 | 
					  "unqualified lookup into dependent bases of class template %1 is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def ext_found_via_dependent_bases_lookup : ExtWarn<"use of identifier %0 "
 | 
					def ext_found_via_dependent_bases_lookup : ExtWarn<"use of identifier %0 "
 | 
				
			||||||
  "found via unqualified lookup into dependent bases of class templates is a "
 | 
					  "found via unqualified lookup into dependent bases of class templates is a "
 | 
				
			||||||
  "Microsoft extension">, InGroup<Microsoft>;
 | 
					  "Microsoft extension">, InGroup<MicrosoftTemplate>;
 | 
				
			||||||
def note_dependent_var_use : Note<"must qualify identifier to find this "
 | 
					def note_dependent_var_use : Note<"must qualify identifier to find this "
 | 
				
			||||||
    "declaration in dependent base class">;
 | 
					    "declaration in dependent base class">;
 | 
				
			||||||
def err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neither "
 | 
					def err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neither "
 | 
				
			||||||
| 
						 | 
					@ -4072,7 +4076,8 @@ def note_extern_c_global_conflict : Note<
 | 
				
			||||||
def warn_weak_import : Warning <
 | 
					def warn_weak_import : Warning <
 | 
				
			||||||
  "an already-declared variable is made a weak_import declaration %0">;
 | 
					  "an already-declared variable is made a weak_import declaration %0">;
 | 
				
			||||||
def ext_static_non_static : Extension<
 | 
					def ext_static_non_static : Extension<
 | 
				
			||||||
  "redeclaring non-static %0 as static is a Microsoft extension">, InGroup<Microsoft>;
 | 
					  "redeclaring non-static %0 as static is a Microsoft extension">,
 | 
				
			||||||
 | 
					  InGroup<MicrosoftRedeclareStatic>;
 | 
				
			||||||
def err_non_static_static : Error<
 | 
					def err_non_static_static : Error<
 | 
				
			||||||
  "non-static declaration of %0 follows static declaration">;
 | 
					  "non-static declaration of %0 follows static declaration">;
 | 
				
			||||||
def err_extern_non_extern : Error<
 | 
					def err_extern_non_extern : Error<
 | 
				
			||||||
| 
						 | 
					@ -4130,9 +4135,11 @@ def ext_forward_ref_enum : Extension<
 | 
				
			||||||
def err_forward_ref_enum : Error<
 | 
					def err_forward_ref_enum : Error<
 | 
				
			||||||
  "ISO C++ forbids forward references to 'enum' types">;
 | 
					  "ISO C++ forbids forward references to 'enum' types">;
 | 
				
			||||||
def ext_ms_forward_ref_enum : Extension<
 | 
					def ext_ms_forward_ref_enum : Extension<
 | 
				
			||||||
  "forward references to 'enum' types are a Microsoft extension">, InGroup<Microsoft>;
 | 
					  "forward references to 'enum' types are a Microsoft extension">,
 | 
				
			||||||
 | 
					  InGroup<MicrosoftEnumForwardReference>;
 | 
				
			||||||
def ext_forward_ref_enum_def : Extension<
 | 
					def ext_forward_ref_enum_def : Extension<
 | 
				
			||||||
  "redeclaration of already-defined enum %0 is a GNU extension">, InGroup<GNURedeclaredEnum>;
 | 
					  "redeclaration of already-defined enum %0 is a GNU extension">,
 | 
				
			||||||
 | 
					  InGroup<GNURedeclaredEnum>;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
 | 
					def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
 | 
				
			||||||
def err_duplicate_member : Error<"duplicate member %0">;
 | 
					def err_duplicate_member : Error<"duplicate member %0">;
 | 
				
			||||||
| 
						 | 
					@ -4325,7 +4332,7 @@ def err_goto_into_protected_scope : Error<
 | 
				
			||||||
  "cannot jump from this goto statement to its label">;
 | 
					  "cannot jump from this goto statement to its label">;
 | 
				
			||||||
def ext_goto_into_protected_scope : ExtWarn<
 | 
					def ext_goto_into_protected_scope : ExtWarn<
 | 
				
			||||||
  "jump from this goto statement to its label is a Microsoft extension">,
 | 
					  "jump from this goto statement to its label is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftGoto>;
 | 
				
			||||||
def warn_cxx98_compat_goto_into_protected_scope : Warning<
 | 
					def warn_cxx98_compat_goto_into_protected_scope : Warning<
 | 
				
			||||||
  "jump from this goto statement to its label is incompatible with C++98">,
 | 
					  "jump from this goto statement to its label is incompatible with C++98">,
 | 
				
			||||||
  InGroup<CXX98Compat>, DefaultIgnore;
 | 
					  InGroup<CXX98Compat>, DefaultIgnore;
 | 
				
			||||||
| 
						 | 
					@ -4458,12 +4465,12 @@ def err_flexible_array_init : Error<
 | 
				
			||||||
def ext_flexible_array_empty_aggregate_ms : Extension<
 | 
					def ext_flexible_array_empty_aggregate_ms : Extension<
 | 
				
			||||||
  "flexible array member %0 in otherwise empty "
 | 
					  "flexible array member %0 in otherwise empty "
 | 
				
			||||||
  "%select{struct|interface|union|class|enum}1 is a Microsoft extension">,
 | 
					  "%select{struct|interface|union|class|enum}1 is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftFlexibleArray>;
 | 
				
			||||||
def err_flexible_array_union : Error<
 | 
					def err_flexible_array_union : Error<
 | 
				
			||||||
  "flexible array member %0 in a union is not allowed">;
 | 
					  "flexible array member %0 in a union is not allowed">;
 | 
				
			||||||
def ext_flexible_array_union_ms : Extension<
 | 
					def ext_flexible_array_union_ms : Extension<
 | 
				
			||||||
  "flexible array member %0 in a union is a Microsoft extension">,
 | 
					  "flexible array member %0 in a union is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftFlexibleArray>;
 | 
				
			||||||
def ext_flexible_array_empty_aggregate_gnu : Extension<
 | 
					def ext_flexible_array_empty_aggregate_gnu : Extension<
 | 
				
			||||||
  "flexible array member %0 in otherwise empty "
 | 
					  "flexible array member %0 in otherwise empty "
 | 
				
			||||||
  "%select{struct|interface|union|class|enum}1 is a GNU extension">,
 | 
					  "%select{struct|interface|union|class|enum}1 is a GNU extension">,
 | 
				
			||||||
| 
						 | 
					@ -4946,10 +4953,10 @@ def err_qualified_param_declarator : Error<
 | 
				
			||||||
def ext_out_of_line_declaration : ExtWarn<
 | 
					def ext_out_of_line_declaration : ExtWarn<
 | 
				
			||||||
  "out-of-line declaration of a member must be a definition">,
 | 
					  "out-of-line declaration of a member must be a definition">,
 | 
				
			||||||
  InGroup<OutOfLineDeclaration>, DefaultError;
 | 
					  InGroup<OutOfLineDeclaration>, DefaultError;
 | 
				
			||||||
def warn_member_extra_qualification : Warning<
 | 
					 | 
				
			||||||
  "extra qualification on member %0">, InGroup<Microsoft>;
 | 
					 | 
				
			||||||
def err_member_extra_qualification : Error<
 | 
					def err_member_extra_qualification : Error<
 | 
				
			||||||
  "extra qualification on member %0">;
 | 
					  "extra qualification on member %0">;
 | 
				
			||||||
 | 
					def warn_member_extra_qualification : Warning<
 | 
				
			||||||
 | 
					  err_member_extra_qualification.Text>, InGroup<MicrosoftExtraQualification>;
 | 
				
			||||||
def warn_namespace_member_extra_qualification : Warning<
 | 
					def warn_namespace_member_extra_qualification : Warning<
 | 
				
			||||||
  "extra qualification on member %0">,
 | 
					  "extra qualification on member %0">,
 | 
				
			||||||
  InGroup<DiagGroup<"extra-qualification">>;
 | 
					  InGroup<DiagGroup<"extra-qualification">>;
 | 
				
			||||||
| 
						 | 
					@ -5425,7 +5432,7 @@ def ext_cast_fn_obj : Extension<
 | 
				
			||||||
def ext_ms_cast_fn_obj : ExtWarn<
 | 
					def ext_ms_cast_fn_obj : ExtWarn<
 | 
				
			||||||
  "static_cast between pointer-to-function and pointer-to-object is a "
 | 
					  "static_cast between pointer-to-function and pointer-to-object is a "
 | 
				
			||||||
  "Microsoft extension">,
 | 
					  "Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftCast>;
 | 
				
			||||||
def warn_cxx98_compat_cast_fn_obj : Warning<
 | 
					def warn_cxx98_compat_cast_fn_obj : Warning<
 | 
				
			||||||
  "cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
 | 
					  "cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
 | 
				
			||||||
  InGroup<CXX98CompatPedantic>, DefaultIgnore;
 | 
					  InGroup<CXX98CompatPedantic>, DefaultIgnore;
 | 
				
			||||||
| 
						 | 
					@ -5535,7 +5542,7 @@ def ext_default_init_const : ExtWarn<
 | 
				
			||||||
  "default initialization of an object of const type %0"
 | 
					  "default initialization of an object of const type %0"
 | 
				
			||||||
  "%select{| without a user-provided default constructor}1 "
 | 
					  "%select{| without a user-provided default constructor}1 "
 | 
				
			||||||
  "is a Microsoft extension">,
 | 
					  "is a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftConstInit>;
 | 
				
			||||||
def err_delete_operand : Error<"cannot delete expression of type %0">;
 | 
					def err_delete_operand : Error<"cannot delete expression of type %0">;
 | 
				
			||||||
def ext_delete_void_ptr_operand : ExtWarn<
 | 
					def ext_delete_void_ptr_operand : ExtWarn<
 | 
				
			||||||
  "cannot delete expression with pointer-to-'void' type %0">,
 | 
					  "cannot delete expression with pointer-to-'void' type %0">,
 | 
				
			||||||
| 
						 | 
					@ -5753,7 +5760,7 @@ def err_pseudo_dtor_base_not_scalar : Error<
 | 
				
			||||||
  "pseudo-destructor expression">;
 | 
					  "pseudo-destructor expression">;
 | 
				
			||||||
def ext_pseudo_dtor_on_void : ExtWarn<
 | 
					def ext_pseudo_dtor_on_void : ExtWarn<
 | 
				
			||||||
  "pseudo-destructors on type void are a Microsoft extension">,
 | 
					  "pseudo-destructors on type void are a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftVoidPseudoDtor>;
 | 
				
			||||||
def err_pseudo_dtor_type_mismatch : Error<
 | 
					def err_pseudo_dtor_type_mismatch : Error<
 | 
				
			||||||
  "the type of object expression "
 | 
					  "the type of object expression "
 | 
				
			||||||
  "%diff{($) does not match the type being destroyed ($)|"
 | 
					  "%diff{($) does not match the type being destroyed ($)|"
 | 
				
			||||||
| 
						 | 
					@ -6503,7 +6510,7 @@ def err_anonymous_record_with_type : Error<
 | 
				
			||||||
  "types cannot be declared in an anonymous %select{struct|union}0">;
 | 
					  "types cannot be declared in an anonymous %select{struct|union}0">;
 | 
				
			||||||
def ext_anonymous_record_with_type : Extension<
 | 
					def ext_anonymous_record_with_type : Extension<
 | 
				
			||||||
  "types declared in an anonymous %select{struct|union}0 are a Microsoft "
 | 
					  "types declared in an anonymous %select{struct|union}0 are a Microsoft "
 | 
				
			||||||
  "extension">, InGroup<Microsoft>;
 | 
					  "extension">, InGroup<MicrosoftAnonTag>;
 | 
				
			||||||
def ext_anonymous_record_with_anonymous_type : Extension<
 | 
					def ext_anonymous_record_with_anonymous_type : Extension<
 | 
				
			||||||
  "anonymous types declared in an anonymous %select{struct|union}0 "
 | 
					  "anonymous types declared in an anonymous %select{struct|union}0 "
 | 
				
			||||||
  "are an extension">, InGroup<DiagGroup<"nested-anon-types">>;
 | 
					  "are an extension">, InGroup<DiagGroup<"nested-anon-types">>;
 | 
				
			||||||
| 
						 | 
					@ -6518,7 +6525,7 @@ def err_anonymous_record_nonpublic_member : Error<
 | 
				
			||||||
  "%select{private|protected}1 data member">;
 | 
					  "%select{private|protected}1 data member">;
 | 
				
			||||||
def ext_ms_anonymous_record : ExtWarn<
 | 
					def ext_ms_anonymous_record : ExtWarn<
 | 
				
			||||||
  "anonymous %select{structs|unions}0 are a Microsoft extension">,
 | 
					  "anonymous %select{structs|unions}0 are a Microsoft extension">,
 | 
				
			||||||
  InGroup<Microsoft>;
 | 
					  InGroup<MicrosoftAnonTag>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// C++ local classes
 | 
					// C++ local classes
 | 
				
			||||||
def err_reference_to_local_var_in_enclosing_function : Error<
 | 
					def err_reference_to_local_var_in_enclosing_function : Error<
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue