Skip to content

Commit 7c07f2b

Browse files
committed
Improve diagnostic messages
1 parent 17f8c3b commit 7c07f2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def err_decomp_decl_constraint : Error<
550550
def err_decomp_decl_parens : Error<
551551
"decomposition declaration cannot be declared with parentheses">;
552552
def err_decomp_decl_template : Error<
553-
"decomposition declaration template not supported">;
553+
"decomposition declaration cannot be a template">;
554554
def err_decomp_decl_not_alone : Error<
555555
"decomposition declaration must be the only declaration in its group">;
556556
def err_decomp_decl_requires_init : Error<

clang/test/Parser/cxx1z-decomposition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace MultiDeclarator {
137137
namespace Template {
138138
int n[3];
139139
// Structured binding template is not allowed.
140-
template<typename T> auto [a, b, c] = n; // expected-error {{decomposition declaration template not supported}}
140+
template<typename T> auto [a, b, c] = n; // expected-error {{decomposition declaration cannot be a template}}
141141
}
142142

143143
namespace Init {

0 commit comments

Comments
 (0)