[clang] [clang-tools-extra] [Clang][Sema] Clarify structured binding diagnostic when initializer is missing (PR #181803)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 22 18:25:44 PST 2026
================
@@ -606,7 +606,8 @@ def err_decomp_decl_template : Error<
def err_decomp_decl_not_alone : Error<
"structured binding declaration must be the only declaration in its group">;
def err_decomp_decl_requires_init : Error<
- "structured binding declaration %0 requires an initializer">;
+ "structured binding declaration %0 requires an initializer; "
+ "expected '=', '(', or a braced initializer list">;
----------------
ojhunt wrote:
The text in the error message isn't the issue - we don't need a change to this.
https://github.com/llvm/llvm-project/pull/181803
More information about the cfe-commits
mailing list