mirror of https://github.com/microsoft/clang.git
Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up.
(Keep -Wmsvc-include around as an alias.) While here, also replace the one other mention of "MSVC" in diagnostics with "Microsoft", for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243444 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ec907c078
commit
d86b642e68
|
@ -717,6 +717,7 @@ def GccCompat : DiagGroup<"gcc-compat">;
|
||||||
|
|
||||||
// Warnings for Microsoft extensions.
|
// Warnings for Microsoft extensions.
|
||||||
def MicrosoftCharize : DiagGroup<"microsoft-charize">;
|
def MicrosoftCharize : DiagGroup<"microsoft-charize">;
|
||||||
|
def MicrosoftInclude : DiagGroup<"microsoft-include">;
|
||||||
def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
|
def MicrosoftCppMacro : DiagGroup<"microsoft-cpp-macro">;
|
||||||
def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
|
def MicrosoftFixedEnum : DiagGroup<"microsoft-fixed-enum">;
|
||||||
def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
|
def MicrosoftSealed : DiagGroup<"microsoft-sealed">;
|
||||||
|
@ -743,12 +744,15 @@ def MicrosoftCast : DiagGroup<"microsoft-cast">;
|
||||||
def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
|
def MicrosoftConstInit : DiagGroup<"microsoft-const-init">;
|
||||||
def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
|
def MicrosoftVoidPseudoDtor : DiagGroup<"microsoft-void-pseudo-dtor">;
|
||||||
def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
|
def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">;
|
||||||
|
// Aliases.
|
||||||
|
def : DiagGroup<"msvc-include", [MicrosoftInclude]>;
|
||||||
|
// -Wmsvc-include = -Wmicrosoft-include
|
||||||
|
|
||||||
// Warnings group for warnings about Microsoft extensions.
|
// Warnings group for warnings about Microsoft extensions.
|
||||||
def Microsoft : DiagGroup<"microsoft",
|
def Microsoft : DiagGroup<"microsoft",
|
||||||
[MicrosoftCharize, MicrosoftCppMacro, MicrosoftFixedEnum, MicrosoftSealed,
|
[MicrosoftCharize, MicrosoftInclude, MicrosoftCppMacro, MicrosoftFixedEnum,
|
||||||
MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec, MicrosoftUsingDecl,
|
MicrosoftSealed, MicrosoftUnqualifiedFriend, MicrosoftExceptionSpec,
|
||||||
MicrosoftMutableReference, MicrosoftPureDefinition,
|
MicrosoftUsingDecl, MicrosoftMutableReference, MicrosoftPureDefinition,
|
||||||
MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
|
MicrosoftUnionMemberReference, MicrosoftExplicitConstructorCall,
|
||||||
MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
|
MicrosoftEnumValue, MicrosoftDefaultArgRedefinition, MicrosoftTemplate,
|
||||||
MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
|
MicrosoftRedeclareStatic, MicrosoftEnumForwardReference, MicrosoftGoto,
|
||||||
|
|
|
@ -311,8 +311,8 @@ def ext_pp_import_directive : Extension<"#import is a language extension">,
|
||||||
def err_pp_import_directive_ms : Error<
|
def err_pp_import_directive_ms : Error<
|
||||||
"#import of type library is an unsupported Microsoft feature">;
|
"#import of type library is an unsupported Microsoft feature">;
|
||||||
def ext_pp_include_search_ms : ExtWarn<
|
def ext_pp_include_search_ms : ExtWarn<
|
||||||
"#include resolved using non-portable MSVC search rules as: %0">,
|
"#include resolved using non-portable Microsoft search rules as: %0">,
|
||||||
InGroup<DiagGroup<"msvc-include">>;
|
InGroup<MicrosoftInclude>;
|
||||||
|
|
||||||
def ext_pp_ident_directive : Extension<"#ident is a language extension">;
|
def ext_pp_ident_directive : Extension<"#ident is a language extension">;
|
||||||
def ext_pp_include_next_directive : Extension<
|
def ext_pp_include_next_directive : Extension<
|
||||||
|
|
|
@ -548,14 +548,14 @@ def err_pragma_options_align_mac68k_target_unsupported : Error<
|
||||||
def warn_pragma_pack_invalid_alignment : Warning<
|
def warn_pragma_pack_invalid_alignment : Warning<
|
||||||
"expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">,
|
"expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">,
|
||||||
InGroup<IgnoredPragmas>;
|
InGroup<IgnoredPragmas>;
|
||||||
// Follow the MSVC implementation.
|
// Follow the Microsoft implementation.
|
||||||
def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
|
def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
|
||||||
def warn_pragma_pack_pop_identifer_and_alignment : Warning<
|
def warn_pragma_pack_pop_identifer_and_alignment : Warning<
|
||||||
"specifying both a name and alignment to 'pop' is undefined">;
|
"specifying both a name and alignment to 'pop' is undefined">;
|
||||||
def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,
|
def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,
|
||||||
InGroup<IgnoredPragmas>;
|
InGroup<IgnoredPragmas>;
|
||||||
def warn_cxx_ms_struct :
|
def warn_cxx_ms_struct :
|
||||||
Warning<"ms_struct may not produce MSVC-compatible layouts for classes "
|
Warning<"ms_struct may not produce Microsoft-compatible layouts for classes "
|
||||||
"with base classes or virtual functions">,
|
"with base classes or virtual functions">,
|
||||||
DefaultError, InGroup<IncompatibleMSStruct>;
|
DefaultError, InGroup<IncompatibleMSStruct>;
|
||||||
def err_section_conflict : Error<"%0 causes a section type conflict with %1">;
|
def err_section_conflict : Error<"%0 causes a section type conflict with %1">;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#warning findme.h successfully included using MS search rules
|
#warning findme.h successfully included using Microsoft header search rules
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#error Wrong findme.h included, MSVC header search incorrect
|
#error Wrong findme.h included, Microsoft header search incorrect
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// RUN: %clang_cc1 -I%S/Inputs/microsoft-header-search %s -fms-compatibility -verify
|
// RUN: %clang_cc1 -I%S/Inputs/microsoft-header-search %s -fms-compatibility -verify
|
||||||
|
|
||||||
// expected-warning@Inputs/microsoft-header-search/a/findme.h:3 {{findme.h successfully included using MS search rules}}
|
// expected-warning@Inputs/microsoft-header-search/a/findme.h:3 {{findme.h successfully included using Microsoft header search rules}}
|
||||||
// expected-warning@Inputs/microsoft-header-search/a/b/include3.h:3 {{#include resolved using non-portable MSVC search rules as}}
|
// expected-warning@Inputs/microsoft-header-search/a/b/include3.h:3 {{#include resolved using non-portable Microsoft search rules as}}
|
||||||
|
|
||||||
// expected-warning@Inputs/microsoft-header-search/falsepos.h:3 {{successfully resolved the falsepos.h header}}
|
// expected-warning@Inputs/microsoft-header-search/falsepos.h:3 {{successfully resolved the falsepos.h header}}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ struct A {
|
||||||
|
|
||||||
struct B : public A {
|
struct B : public A {
|
||||||
#ifdef TEST_FOR_ERROR
|
#ifdef TEST_FOR_ERROR
|
||||||
// expected-error@-2 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
|
// expected-error@-2 {{ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions}}
|
||||||
#else
|
#else
|
||||||
// expected-warning@-4 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
|
// expected-warning@-4 {{ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions}}
|
||||||
#endif
|
#endif
|
||||||
unsigned long c:16;
|
unsigned long c:16;
|
||||||
int d;
|
int d;
|
||||||
|
@ -26,9 +26,9 @@ static_assert(__builtin_offsetof(B, d) == 12,
|
||||||
// rdar://16178895
|
// rdar://16178895
|
||||||
struct C {
|
struct C {
|
||||||
#ifdef TEST_FOR_ERROR
|
#ifdef TEST_FOR_ERROR
|
||||||
// expected-error@-2 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
|
// expected-error@-2 {{ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions}}
|
||||||
#else
|
#else
|
||||||
// expected-warning@-4 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
|
// expected-warning@-4 {{ms_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions}}
|
||||||
#endif
|
#endif
|
||||||
virtual void foo();
|
virtual void foo();
|
||||||
long long n;
|
long long n;
|
||||||
|
|
Loading…
Reference in New Issue