|
13 | 13 | let Component = "Sema" in { |
14 | 14 | let CategoryName = "Semantic Issue" in { |
15 | 15 | // C++11 compatibility with C++98. |
16 | | -defm nonclass_type_friend : CXX11CompatWarn<"non-class friend type %0 is">; |
17 | | -defm static_data_member_in_union : CXX11CompatWarn<"static data member %0 in union is">; |
18 | | -defm templ_default_in_function_templ : CXX11CompatWarn< |
| 16 | +defm nonclass_type_friend : CXX11Compat<"non-class friend type %0 is">; |
| 17 | +defm static_data_member_in_union : CXX11Compat<"static data member %0 in union is">; |
| 18 | +defm templ_default_in_function_templ : CXX11Compat< |
19 | 19 | "default template arguments for a function template are">; |
20 | | -defm template_arg_extra_parens : CXX11CompatWarn< |
| 20 | +defm template_arg_extra_parens : CXX11Compat< |
21 | 21 | "parentheses around address non-type template argument are">; |
22 | | -defm typename_outside_of_template : CXX11CompatWarn<"'typename' outside of a template is">; |
| 22 | +defm typename_outside_of_template : CXX11Compat<"'typename' outside of a template is">; |
23 | 23 |
|
24 | 24 | // C++14 compatibility with C++11 and earlier. |
25 | | -defm constexpr_type_definition : CXX14CompatWarn< |
| 25 | +defm constexpr_type_definition : CXX14Compat< |
26 | 26 | "type definition in a constexpr %select{function|constructor}0 is">; |
27 | | -defm constexpr_local_var : CXX14CompatWarn< |
| 27 | +defm constexpr_local_var : CXX14Compat< |
28 | 28 | "variable declaration in a constexpr %select{function|constructor}0 is">; |
29 | | -defm constexpr_body_multiple_return : CXX14CompatWarn< |
| 29 | +defm constexpr_body_multiple_return : CXX14Compat< |
30 | 30 | "multiple return statements in constexpr function is">; |
31 | | -defm variable_template : CXX14CompatWarn<"variable templates are">; |
| 31 | +defm variable_template : CXX14Compat<"variable templates are">; |
32 | 32 |
|
33 | 33 | // C++17 compatibility with C++14 and earlier. |
34 | | -defm decomp_decl : CXX17CompatWarn<"decomposition declarations are">; |
35 | | -defm inline_variable : CXX17CompatWarn<"inline variables are">; |
| 34 | +defm decomp_decl : CXX17Compat<"decomposition declarations are">; |
| 35 | +defm inline_variable : CXX17Compat<"inline variables are">; |
36 | 36 |
|
37 | 37 | // C++20 compatibility with C++17 and earlier. |
38 | | -defm decomp_decl_spec : CXX20CompatWarn< |
| 38 | +defm decomp_decl_spec : CXX20Compat< |
39 | 39 | "decomposition declaration declared " |
40 | 40 | "%plural{1:'%1'|:with '%1' specifiers}0 is">; |
41 | | -defm constexpr_local_var_no_init : CXX20CompatWarn< |
| 41 | +defm constexpr_local_var_no_init : CXX20Compat< |
42 | 42 | "uninitialized variable in a constexpr %select{function|constructor}0 is">; |
43 | | -defm constexpr_function_try_block : CXX20CompatWarn< |
| 43 | +defm constexpr_function_try_block : CXX20Compat< |
44 | 44 | "function try block in constexpr %select{function|constructor}0 is">; |
45 | | -defm constexpr_union_ctor_no_init : CXX20CompatWarn< |
| 45 | +defm constexpr_union_ctor_no_init : CXX20Compat< |
46 | 46 | "constexpr union constructor that does not initialize any member is">; |
47 | | -defm constexpr_ctor_missing_init : CXX20CompatWarn< |
| 47 | +defm constexpr_ctor_missing_init : CXX20Compat< |
48 | 48 | "constexpr constructor that does not initialize all members is">; |
49 | | -defm adl_only_template_id : CXX20CompatWarn< |
| 49 | +defm adl_only_template_id : CXX20Compat< |
50 | 50 | "use of function template name with no prior declaration in function call " |
51 | 51 | "with explicit template arguments is">; |
52 | 52 |
|
53 | 53 | // C++23 compatibility with C++20 and earlier. |
54 | | -defm constexpr_static_var : CXX23CompatWarn< |
| 54 | +defm constexpr_static_var : CXX23Compat< |
55 | 55 | "definition of a %select{static|thread_local}1 variable " |
56 | 56 | "in a constexpr %select{function|constructor}0 " |
57 | 57 | "is">; |
58 | 58 |
|
59 | 59 | // C++26 compatibility with C++23 and earlier. |
60 | | -defm decomp_decl_cond : CXX26CompatWarn<"structured binding declaration in a condition is">; |
| 60 | +defm decomp_decl_cond : CXX26Compat<"structured binding declaration in a condition is">; |
61 | 61 |
|
62 | 62 | // Compatibility warnings duplicated across multiple language versions. |
63 | 63 | foreach std = [14, 20, 23] in { |
64 | | - defm constexpr_body_invalid_stmt : CXXCompatWarn< |
| 64 | + defm constexpr_body_invalid_stmt : CXXCompat< |
65 | 65 | "use of this statement in a constexpr %select{function|constructor}0 is", |
66 | 66 | /*default_ignore=*/false, |
67 | 67 | std>; |
|
0 commit comments