forked from OSchip/llvm-project
Add warning flags for #include_next and some nearby warnings.
llvm-svn: 250105
This commit is contained in:
parent
66a123806e
commit
2c072af95e
|
@ -202,6 +202,7 @@ def InfiniteRecursion : DiagGroup<"infinite-recursion">;
|
|||
def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">;
|
||||
def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
|
||||
def : DiagGroup<"import">;
|
||||
def GNUIncludeNext : DiagGroup<"gnu-include-next">;
|
||||
def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">;
|
||||
def IncompatiblePointerTypesDiscardsQualifiers
|
||||
: DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
|
||||
|
@ -708,7 +709,8 @@ def GNU : DiagGroup<"gnu", [GNUAlignofExpression, GNUAnonymousStruct,
|
|||
GNUEmptyInitializer, GNUEmptyStruct,
|
||||
VLAExtension, GNUFlexibleArrayInitializer,
|
||||
GNUFlexibleArrayUnionMember, GNUFoldingConstant,
|
||||
GNUImaginaryConstant, GNULabelsAsValue,
|
||||
GNUImaginaryConstant, GNUIncludeNext,
|
||||
GNULabelsAsValue,
|
||||
RedeclaredClassMember, GNURedeclaredEnum,
|
||||
GNUStatementExpression, GNUStaticFloatInit,
|
||||
GNUStringLiteralOperatorTemplate,
|
||||
|
|
|
@ -256,10 +256,13 @@ def err_pp_hash_error : Error<"%0">;
|
|||
}
|
||||
|
||||
def pp_include_next_in_primary : Warning<
|
||||
"#include_next in primary source file">;
|
||||
"#include_next in primary source file">,
|
||||
InGroup<DiagGroup<"include-next-outside-header">>;
|
||||
def pp_include_macros_out_of_predefines : Error<
|
||||
"the #__include_macros directive is only for internal use by -imacros">;
|
||||
def pp_include_next_absolute_path : Warning<"#include_next with absolute path">;
|
||||
def pp_include_next_absolute_path : Warning<
|
||||
"#include_next with absolute path">,
|
||||
InGroup<DiagGroup<"include-next-absolute-path">>;
|
||||
def ext_c99_whitespace_required_after_macro_name : ExtWarn<
|
||||
"ISO C99 requires whitespace after the macro name">, InGroup<C99>;
|
||||
def ext_missing_whitespace_after_macro_name : ExtWarn<
|
||||
|
@ -267,9 +270,11 @@ def ext_missing_whitespace_after_macro_name : ExtWarn<
|
|||
def warn_missing_whitespace_after_macro_name : Warning<
|
||||
"whitespace recommended after macro name">;
|
||||
|
||||
def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">;
|
||||
def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">,
|
||||
InGroup<DiagGroup<"pragma-once-outside-header">>;
|
||||
def pp_pragma_sysheader_in_main_file : Warning<
|
||||
"#pragma system_header ignored in main file">;
|
||||
"#pragma system_header ignored in main file">,
|
||||
InGroup<DiagGroup<"pragma-system-header-outside-header">>;
|
||||
def pp_poisoning_existing_macro : Warning<"poisoning existing macro">;
|
||||
def pp_out_of_date_dependency : Warning<
|
||||
"current file is older than dependency %0">;
|
||||
|
@ -316,7 +321,7 @@ def ext_pp_include_search_ms : ExtWarn<
|
|||
|
||||
def ext_pp_ident_directive : Extension<"#ident is a language extension">;
|
||||
def ext_pp_include_next_directive : Extension<
|
||||
"#include_next is a language extension">;
|
||||
"#include_next is a language extension">, InGroup<GNUIncludeNext>;
|
||||
def ext_pp_warning_directive : Extension<"#warning is a language extension">;
|
||||
|
||||
def ext_pp_extra_tokens_at_eol : ExtWarn<
|
||||
|
|
|
@ -18,7 +18,7 @@ This test serves two purposes:
|
|||
|
||||
The list of warnings below should NEVER grow. It should gradually shrink to 0.
|
||||
|
||||
CHECK: Warnings without flags (89):
|
||||
CHECK: Warnings without flags (85):
|
||||
CHECK-NEXT: ext_excess_initializers
|
||||
CHECK-NEXT: ext_excess_initializers_in_char_array_initializer
|
||||
CHECK-NEXT: ext_expected_semi_decl_list
|
||||
|
@ -35,13 +35,9 @@ CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard
|
|||
CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers
|
||||
CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer
|
||||
CHECK-NEXT: ext_using_undefined_std
|
||||
CHECK-NEXT: pp_include_next_absolute_path
|
||||
CHECK-NEXT: pp_include_next_in_primary
|
||||
CHECK-NEXT: pp_invalid_string_literal
|
||||
CHECK-NEXT: pp_out_of_date_dependency
|
||||
CHECK-NEXT: pp_poisoning_existing_macro
|
||||
CHECK-NEXT: pp_pragma_once_in_main_file
|
||||
CHECK-NEXT: pp_pragma_sysheader_in_main_file
|
||||
CHECK-NEXT: w_asm_qualifier_ignored
|
||||
CHECK-NEXT: warn_accessor_property_type_mismatch
|
||||
CHECK-NEXT: warn_arcmt_nsalloc_realloc
|
||||
|
@ -111,4 +107,4 @@ CHECK-NEXT: warn_weak_import
|
|||
|
||||
The list of warnings in -Wpedantic should NEVER grow.
|
||||
|
||||
CHECK: Number in -Wpedantic (not covered by other -W flags): 28
|
||||
CHECK: Number in -Wpedantic (not covered by other -W flags): 27
|
||||
|
|
Loading…
Reference in New Issue