Skip to content

Commit f60f931

Browse files
committed
update diagnostic args order
1 parent cb5b183 commit f60f931

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticParseKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,13 +1141,13 @@ def warn_cxx23_compat_binding_pack : Warning<
11411141
def err_capture_default_first : Error<
11421142
"capture default must be first">;
11431143
def ext_decl_attrs_on_lambda : ExtWarn<
1144-
"%select{an attribute specifier sequence|%0}1 in this position "
1144+
"%select{an attribute specifier sequence|%1}0 in this position "
11451145
"is a C++23 extension">, InGroup<CXX23AttrsOnLambda>;
11461146
def ext_lambda_missing_parens : ExtWarn<
11471147
"lambda without a parameter clause is a C++23 extension">,
11481148
InGroup<CXX23>;
11491149
def warn_cxx20_compat_decl_attrs_on_lambda : Warning<
1150-
"%select{an attribute specifier sequence|%0}1 in this position "
1150+
"%select{an attribute specifier sequence|%1}0 in this position "
11511151
"is incompatible with C++ standards before C++23">,
11521152
InGroup<CXXPre23Compat>, DefaultIgnore;
11531153

clang/lib/Parse/ParseExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
12991299
Diag(Tok, getLangOpts().CPlusPlus23
13001300
? diag::warn_cxx20_compat_decl_attrs_on_lambda
13011301
: diag::ext_decl_attrs_on_lambda)
1302-
<< Tok.getIdentifierInfo() << Tok.isRegularKeywordAttribute();
1302+
<< Tok.isRegularKeywordAttribute() << Tok.getIdentifierInfo();
13031303
MaybeParseCXX11Attributes(D);
13041304
}
13051305

0 commit comments

Comments
 (0)