diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /clang/include/clang/Basic/DiagnosticParseKinds.td | |
parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
download | src-7fa27ce4a07f19b07799a767fc29416f3b625afb.tar.gz src-7fa27ce4a07f19b07799a767fc29416f3b625afb.zip |
Diffstat (limited to 'clang/include/clang/Basic/DiagnosticParseKinds.td')
-rw-r--r-- | clang/include/clang/Basic/DiagnosticParseKinds.td | 102 |
1 files changed, 59 insertions, 43 deletions
diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index c367a34b762b..8d729c31641e 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -157,11 +157,17 @@ def err_duplicate_default_assoc : Error< "duplicate default generic association">; def note_previous_default_assoc : Note< "previous default generic association is here">; +def ext_generic_with_type_arg : Extension< + "passing a type argument as the first operand to '_Generic' is a Clang " + "extension">, InGroup<DiagGroup<"generic-type-extension">>; def ext_c99_feature : Extension< "'%0' is a C99 extension">, InGroup<C99>; def ext_c11_feature : Extension< "'%0' is a C11 extension">, InGroup<C11>; +def warn_c2x_compat_keyword : Warning< + "'%0' is incompatible with C standards before C2x">, + InGroup<CPre2xCompat>, DefaultIgnore; def err_c11_noreturn_misplaced : Error< "'_Noreturn' keyword must precede function declarator">; @@ -179,8 +185,6 @@ def ext_gnu_statement_expr_macro : Extension< InGroup<GNUStatementExpressionFromMacroExpansion>; def ext_gnu_conditional_expr : Extension< "use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>; -def ext_gnu_empty_initializer : Extension< - "use of GNU empty initializer extension">, InGroup<GNUEmptyInitializer>; def ext_gnu_array_range : Extension<"use of GNU array range extension">, InGroup<GNUDesignator>; def ext_gnu_missing_equal_designator : ExtWarn< @@ -299,14 +303,14 @@ def ext_c_label_end_of_compound_statement : ExtWarn< "label at end of compound statement is a C2x extension">, InGroup<C2x>; def ext_cxx_label_end_of_compound_statement : ExtWarn< - "label at end of compound statement is a C++2b extension">, - InGroup<CXX2b>; + "label at end of compound statement is a C++23 extension">, + InGroup<CXX23>; def warn_c2x_compat_label_end_of_compound_statement : Warning< "label at end of compound statement is incompatible with C standards before C2x">, InGroup<CPre2xCompat>, DefaultIgnore; def warn_cxx20_compat_label_end_of_compound_statement : Warning< - "label at end of compound statement is incompatible with C++ standards before C++2b">, - InGroup<CXXPre2bCompat>, DefaultIgnore; + "label at end of compound statement is incompatible with C++ standards before C++23">, + InGroup<CXXPre23Compat>, DefaultIgnore; def err_address_of_label_outside_fn : Error< "use of address-of-label extension outside of a function body">; def err_asm_operand_wide_string_literal : Error< @@ -371,9 +375,6 @@ def warn_cxx11_compat_decltype_auto_type_specifier : Warning< def ext_auto_type : Extension< "'__auto_type' is a GNU extension">, InGroup<GNUAutoType>; -def warn_c2x_compat_typeof_type_specifier : Warning< - "'%select{typeof|typeof_unqual}0' is incompatible with C standards before " - "C2x">, InGroup<CPre2xCompat>, DefaultIgnore; def ext_for_range : ExtWarn< "range-based for loop is a C++11 extension">, InGroup<CXX11>; def warn_cxx98_compat_for_range : Warning< @@ -552,7 +553,7 @@ def err_invalid_operator_on_type : Error< def err_expected_unqualified_id : Error< "expected %select{identifier|unqualified-id}0">; def err_while_loop_outside_of_a_function : Error< - "while loop outside of a function">; + "while loop outside of a function">; def err_brackets_go_after_unqualified_id : Error< "brackets are not allowed here; to declare an array, " "place the brackets after the %select{identifier|name}0">; @@ -568,11 +569,11 @@ def err_expected_init_in_condition_lparen : Error< def err_extraneous_rparen_in_condition : Error< "extraneous ')' after condition, expected a statement">; def ext_alias_in_init_statement : ExtWarn< - "alias declaration in this context is a C++2b extension">, - InGroup<CXX2b>; + "alias declaration in this context is a C++23 extension">, + InGroup<CXX23>; def warn_cxx20_alias_in_init_statement : Warning< - "alias declaration in this context is incompatible with C++ standards before C++2b">, - DefaultIgnore, InGroup<CXXPre2bCompat>; + "alias declaration in this context is incompatible with C++ standards before C++23">, + DefaultIgnore, InGroup<CXXPre23Compat>; def warn_dangling_else : Warning< "add explicit braces to avoid dangling else">, InGroup<DanglingElse>; @@ -654,11 +655,11 @@ def warn_cxx14_compat_constexpr_if : Warning< "constexpr if is incompatible with C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre17Compat>; def ext_consteval_if : ExtWarn< - "consteval if is a C++2b extension">, - InGroup<CXX2b>; + "consteval if is a C++23 extension">, + InGroup<CXX23>; def warn_cxx20_compat_consteval_if : Warning< - "consteval if is incompatible with C++ standards before C++2b">, - InGroup<CXXPre2bCompat>, DefaultIgnore; + "consteval if is incompatible with C++ standards before C++23">, + InGroup<CXXPre23Compat>, DefaultIgnore; def ext_init_statement : ExtWarn< "'%select{if|switch}0' initialization statements are a C++17 extension">, @@ -704,9 +705,6 @@ def warn_cxx98_compat_nullptr : Warning< "'nullptr' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; def ext_c_nullptr : Extension< "'nullptr' is a C2x extension">, InGroup<C2x>; -def warn_c17_compat_nullptr : Warning< - "'nullptr' is incompatible with C standards before C2x">, - InGroup<CPre2xCompat>, DefaultIgnore; def warn_wrong_clang_attr_namespace : Warning< "'__clang__' is a predefined macro name, not an attribute scope specifier; " @@ -721,8 +719,17 @@ def warn_cxx14_compat_ns_enum_attribute : Warning< def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; def warn_cxx98_compat_attribute : Warning< - "C++11 attribute syntax is incompatible with C++98">, + "[[]] attributes are incompatible with C++ standards before C++11">, InGroup<CXX98Compat>, DefaultIgnore; +def warn_ext_cxx11_attributes : Extension< + "[[]] attributes are a C++11 extension">, + InGroup<CXX11>; +def warn_pre_c2x_compat_attributes : Warning< + "[[]] attributes are incompatible with C standards before C2x">, + DefaultIgnore, InGroup<CPre2xCompat>; +def warn_ext_c2x_attributes : Extension< + "[[]] attributes are a C2x extension">, + InGroup<C2x>; def err_cxx11_attribute_forbids_arguments : Error< "attribute %0 cannot have an argument list">; def err_attribute_requires_arguments : Error< @@ -738,10 +745,12 @@ def ext_using_attribute_ns : ExtWarn< def err_using_attribute_ns_conflict : Error< "attribute with scope specifier cannot follow default scope specifier">; def err_attributes_not_allowed : Error<"an attribute list cannot appear here">; +def err_keyword_not_allowed : Error<"%0 cannot appear here">; def ext_cxx11_attr_placement : ExtWarn< - "ISO C++ does not allow an attribute list to appear here">, + "ISO C++ does not allow %select{an attribute list|%0}1 to appear here">, InGroup<DiagGroup<"cxx-attribute-extension">>; def err_attributes_misplaced : Error<"misplaced attributes; expected attributes here">; +def err_keyword_misplaced : Error<"misplaced %0; expected %0 here">; def err_l_square_l_square_not_attribute : Error< "C++11 only allows consecutive left square brackets when " "introducing an attribute">; @@ -1019,14 +1028,15 @@ def err_lambda_capture_multiple_ellipses : Error< def err_capture_default_first : Error< "capture default must be first">; def ext_decl_attrs_on_lambda : ExtWarn< - "an attribute specifier sequence in this position is a C++2b extension">, - InGroup<CXX2b>; + "%select{an attribute specifier sequence|%0}1 in this position " + "is a C++23 extension">, InGroup<CXX23>; def ext_lambda_missing_parens : ExtWarn< - "lambda without a parameter clause is a C++2b extension">, - InGroup<CXX2b>; + "lambda without a parameter clause is a C++23 extension">, + InGroup<CXX23>; def warn_cxx20_compat_decl_attrs_on_lambda : Warning< - "an attribute specifier sequence in this position is incompatible with C++ " - "standards before C++2b">, InGroup<CXXPre2bCompat>, DefaultIgnore; + "%select{an attribute specifier sequence|%1}0 in this position " + "is incompatible with C++ standards before C++23">, + InGroup<CXXPre23Compat>, DefaultIgnore; // C++17 lambda expressions def err_expected_star_this_capture : Error< @@ -1049,12 +1059,12 @@ def warn_cxx17_compat_lambda_template_parameter_list: Warning< def err_lambda_template_parameter_list_empty : Error< "lambda template parameter list cannot be empty">; -// C++2b static lambdas +// C++23 static lambdas def err_static_lambda: ExtWarn< - "static lambdas are a C++2b extension">, InGroup<CXX2b>; -def warn_cxx20_compat_static_lambda: ExtWarn< - "static lambdas are incompatible with C++ standards before C++2b">, - InGroup<CXXPre2bCompat>, DefaultIgnore; + "static lambdas are a C++23 extension">, InGroup<CXX23>; +def warn_cxx20_compat_static_lambda : Warning< + "static lambdas are incompatible with C++ standards before C++23">, + InGroup<CXXPre23Compat>, DefaultIgnore; def err_static_mutable_lambda : Error< "lambda cannot be both mutable and static">; def err_static_lambda_captures : Error< @@ -1104,7 +1114,7 @@ def err_availability_query_repeated_star : Error< // External source symbol attribute def err_external_source_symbol_expected_keyword : Error< - "expected 'language', 'defined_in', or 'generated_declaration'">; + "expected 'language', 'defined_in', 'generated_declaration', or 'USR'">; def err_external_source_symbol_duplicate_clause : Error< "duplicate %0 clause in an 'external_source_symbol' attribute">; @@ -1303,6 +1313,10 @@ def note_pragma_attribute_namespace_on_attribute : Note< def warn_no_support_for_eval_method_source_on_m32 : Warning< "Setting the floating point evaluation method to `source` on a target" " without SSE is not supported.">, InGroup<Pragmas>; +// - #pragma __debug +def warn_pragma_debug_dependent_argument : Warning< + "%select{value|type}0-dependent expression passed as an argument to debug " + "command">, InGroup<IgnoredPragmas>; // OpenCL EXTENSION pragma (OpenCL 1.1 [9.1]) def warn_pragma_expected_colon : Warning< @@ -1358,6 +1372,7 @@ def err_omp_expected_punc_after_iterator : Error< "expected ',' or ')' after iterator specifier">; def err_omp_decl_in_declare_simd_variant : Error< "function declaration is expected after 'declare %select{simd|variant}0' directive">; +def err_omp_sink_and_source_iteration_not_allowd: Error<" '%0 %select{sink:|source:}1' must be with '%select{omp_cur_iteration - 1|omp_cur_iteration}1'">; def err_omp_unknown_map_type : Error< "incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'">; def err_omp_unknown_map_type_modifier : Error< @@ -1369,6 +1384,9 @@ def err_omp_map_type_modifier_missing : Error< "missing map type modifier">; def err_omp_declare_simd_inbranch_notinbranch : Error< "unexpected '%0' clause, '%1' is specified already">; +def err_omp_expected_clause_argument + : Error<"expected '%0' clause with an argument on '#pragma omp %1' " + "construct">; def err_expected_end_declare_target_or_variant : Error< "expected '#pragma omp end declare %select{target|variant}0'">; def err_expected_begin_declare_variant @@ -1520,6 +1538,8 @@ def err_omp_requires_out_inout_depend_type : Error< def warn_omp_more_one_omp_all_memory : Warning< "reserved locator 'omp_all_memory' cannot be specified more than once">, InGroup<OpenMPClauses>; +def warn_omp_depend_in_ordered_deprecated : Warning<"'depend' clause for" + " 'ordered' is deprecated; use 'doacross' instead">, InGroup<Deprecated>; // Pragma loop support. def err_pragma_loop_missing_argument : Error< @@ -1571,9 +1591,6 @@ def warn_ext_int_deprecated : Warning< def ext_bit_int : Extension< "'_BitInt' in %select{C17 and earlier|C++}0 is a Clang extension">, InGroup<DiagGroup<"bit-int-extension">>; -def warn_c17_compat_bit_int : Warning< - "'_BitInt' is incompatible with C standards before C2x">, - InGroup<CPre2xCompat>, DefaultIgnore; } // end of Parse Issue category. let CategoryName = "Modules Issue" in { @@ -1583,8 +1600,12 @@ def err_module_expected_ident : Error< "expected a module name after '%select{module|import}0'">; def err_attribute_not_module_attr : Error< "%0 attribute cannot be applied to a module">; +def err_keyword_not_module_attr : Error< + "%0 cannot be applied to a module">; def err_attribute_not_import_attr : Error< "%0 attribute cannot be applied to a module import">; +def err_keyword_not_import_attr : Error< + "%0 cannot be applied to a module import">; def err_module_expected_semi : Error< "expected ';' after module name">; def err_global_module_introducer_not_at_start : Error< @@ -1607,11 +1628,6 @@ def err_import_in_wrong_fragment : Error< def err_export_empty : Error<"export declaration cannot be empty">; } -def ext_offsetof_member_designator : Extension< - "using %select{a member access expression|an array subscript expression}0 " - "within '%select{__builtin_offsetof|offsetof}1' is a Clang extension">, - InGroup<GNUOffsetofExtensions>; - let CategoryName = "Generics Issue" in { def err_objc_expected_type_parameter : Error< |