Skip to content

Commit ff090e2

Browse files
committed
Rename and reorder parameters
1 parent 2305284 commit ff090e2

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

clang/include/clang/Basic/Diagnostic.td

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ class DefaultWarnNoWerror {
155155
}
156156
class DefaultRemark { Severity DefaultSeverity = SEV_Remark; }
157157

158-
// C++ compatibility warnings
158+
// C++ compatibility warnings.
159159
multiclass CXXCompat<
160160
string message,
161-
bit default_ignore,
162161
int std_ver,
162+
bit ext_warn = true,
163163
string std_ver_override = ""#std_ver> {
164164
// 'X is a C++YZ extension'.
165165
def compat_pre_cxx#std_ver#_#NAME :
166166
Diagnostic<!strconcat(message, " a C++", std_ver_override, " extension"),
167167
CLASS_EXTENSION,
168-
!if(default_ignore, SEV_Ignored, SEV_Warning)>,
168+
!if(ext_warn, SEV_Warning, SEV_Ignored)>,
169169
InGroup<!cast<DiagGroup>("CXX"#std_ver)>;
170170

171171
// 'X is incompatible with C++98' (if std_ver == 11).
@@ -180,23 +180,23 @@ multiclass CXXCompat<
180180
DefaultIgnore;
181181
}
182182

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

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

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

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

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

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

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

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ defm decomp_decl_cond : CXX26Compat<"structured binding declaration in a conditi
6262
// Compatibility warnings duplicated across multiple language versions.
6363
foreach std = [14, 20, 23] in {
6464
defm constexpr_body_invalid_stmt : CXXCompat<
65-
"use of this statement in a constexpr %select{function|constructor}0 is",
66-
/*default_ignore=*/false,
67-
std>;
65+
"use of this statement in a constexpr %select{function|constructor}0 is", std>;
6866
}
6967

7068
def note_previous_decl : Note<"%0 declared here">;

0 commit comments

Comments
 (0)