Skip to content

Commit 2305284

Browse files
committed
Shorten 'CompatWarn' to just 'Compat'
1 parent 1237a15 commit 2305284

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

clang/include/clang/Basic/Diagnostic.td

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class DefaultWarnNoWerror {
156156
class DefaultRemark { Severity DefaultSeverity = SEV_Remark; }
157157

158158
// C++ compatibility warnings
159-
multiclass CXXCompatWarn<
159+
multiclass CXXCompat<
160160
string message,
161161
bit default_ignore,
162162
int std_ver,
@@ -180,23 +180,23 @@ multiclass CXXCompatWarn<
180180
DefaultIgnore;
181181
}
182182

183-
multiclass CXX11CompatWarn<string message, bit default_ignore = false>
184-
: CXXCompatWarn<message, default_ignore, 11>;
183+
multiclass CXX11Compat<string message, bit default_ignore = false>
184+
: CXXCompat<message, default_ignore, 11>;
185185

186-
multiclass CXX14CompatWarn<string message, bit default_ignore = false>
187-
: CXXCompatWarn<message, default_ignore, 14>;
186+
multiclass CXX14Compat<string message, bit default_ignore = false>
187+
: CXXCompat<message, default_ignore, 14>;
188188

189-
multiclass CXX17CompatWarn<string message, bit default_ignore = false>
190-
: CXXCompatWarn<message, default_ignore, 17>;
189+
multiclass CXX17Compat<string message, bit default_ignore = false>
190+
: CXXCompat<message, default_ignore, 17>;
191191

192-
multiclass CXX20CompatWarn<string message, bit default_ignore = false>
193-
: CXXCompatWarn<message, default_ignore, 20>;
192+
multiclass CXX20Compat<string message, bit default_ignore = false>
193+
: CXXCompat<message, default_ignore, 20>;
194194

195-
multiclass CXX23CompatWarn<string message, bit default_ignore = false>
196-
: CXXCompatWarn<message, default_ignore, 23>;
195+
multiclass CXX23Compat<string message, bit default_ignore = false>
196+
: CXXCompat<message, default_ignore, 23>;
197197

198-
multiclass CXX26CompatWarn<string message, bit default_ignore = false>
199-
: CXXCompatWarn<message, default_ignore, 26, "2c">;
198+
multiclass CXX26Compat<string message, bit default_ignore = false>
199+
: CXXCompat<message, default_ignore, 26, "2c">;
200200

201201
// Definitions for Diagnostics.
202202
include "DiagnosticASTKinds.td"

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,55 @@
1313
let Component = "Sema" in {
1414
let CategoryName = "Semantic Issue" in {
1515
// 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<
1919
"default template arguments for a function template are">;
20-
defm template_arg_extra_parens : CXX11CompatWarn<
20+
defm template_arg_extra_parens : CXX11Compat<
2121
"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">;
2323

2424
// C++14 compatibility with C++11 and earlier.
25-
defm constexpr_type_definition : CXX14CompatWarn<
25+
defm constexpr_type_definition : CXX14Compat<
2626
"type definition in a constexpr %select{function|constructor}0 is">;
27-
defm constexpr_local_var : CXX14CompatWarn<
27+
defm constexpr_local_var : CXX14Compat<
2828
"variable declaration in a constexpr %select{function|constructor}0 is">;
29-
defm constexpr_body_multiple_return : CXX14CompatWarn<
29+
defm constexpr_body_multiple_return : CXX14Compat<
3030
"multiple return statements in constexpr function is">;
31-
defm variable_template : CXX14CompatWarn<"variable templates are">;
31+
defm variable_template : CXX14Compat<"variable templates are">;
3232

3333
// 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">;
3636

3737
// C++20 compatibility with C++17 and earlier.
38-
defm decomp_decl_spec : CXX20CompatWarn<
38+
defm decomp_decl_spec : CXX20Compat<
3939
"decomposition declaration declared "
4040
"%plural{1:'%1'|:with '%1' specifiers}0 is">;
41-
defm constexpr_local_var_no_init : CXX20CompatWarn<
41+
defm constexpr_local_var_no_init : CXX20Compat<
4242
"uninitialized variable in a constexpr %select{function|constructor}0 is">;
43-
defm constexpr_function_try_block : CXX20CompatWarn<
43+
defm constexpr_function_try_block : CXX20Compat<
4444
"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<
4646
"constexpr union constructor that does not initialize any member is">;
47-
defm constexpr_ctor_missing_init : CXX20CompatWarn<
47+
defm constexpr_ctor_missing_init : CXX20Compat<
4848
"constexpr constructor that does not initialize all members is">;
49-
defm adl_only_template_id : CXX20CompatWarn<
49+
defm adl_only_template_id : CXX20Compat<
5050
"use of function template name with no prior declaration in function call "
5151
"with explicit template arguments is">;
5252

5353
// C++23 compatibility with C++20 and earlier.
54-
defm constexpr_static_var : CXX23CompatWarn<
54+
defm constexpr_static_var : CXX23Compat<
5555
"definition of a %select{static|thread_local}1 variable "
5656
"in a constexpr %select{function|constructor}0 "
5757
"is">;
5858

5959
// 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">;
6161

6262
// Compatibility warnings duplicated across multiple language versions.
6363
foreach std = [14, 20, 23] in {
64-
defm constexpr_body_invalid_stmt : CXXCompatWarn<
64+
defm constexpr_body_invalid_stmt : CXXCompat<
6565
"use of this statement in a constexpr %select{function|constructor}0 is",
6666
/*default_ignore=*/false,
6767
std>;

0 commit comments

Comments
 (0)