================
@@ -245,6 +245,10 @@ Improvements to Clang's diagnostics
 - The ``-Wloop-analysis`` warning has been extended to catch more cases of
   variable modification inside lambda expressions (#GH132038).
 
+- Improved the diagnostic for structured binding declarations missing an
+  initializer to tell the user what is expected (``=``, ``(``, or a braced
+  initializer list). (#GH90107)
----------------
Z3rox-dev wrote:

When a structured binding declaration has a stray token between the bindings 
and the initializer 
example : [auto [A, B] C = MyFunc(); 
clang emits decomposition declaration '[A, B]' requires an initializer which 
doesn't tell the user what syntax is actually expected. 
This patch appends the expected forms (=, (, or a braced initializer list) to 
make the diagnostic actionable. See #90107.

https://github.com/llvm/llvm-project/pull/181803
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to