================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2c -Wunused %s
+
+namespace GH125810 {
+struct S {
+  int a, b;
+};
+
+void t(S s) {
+  auto &[_, _] = s;
+  auto &[a1, _] = s; // expected-warning {{unused variable '[a1, _]'}}
----------------
a-tarasyuk wrote:

@cor3ntin @AaronBallman Currently, https://godbolt.org/z/911KjMjPY the entire 
binding declaration is used as the diagnostic location, including all binding 
elements, even when only some of them are actually unused. Is this the expected 
behavior?

https://github.com/llvm/llvm-project/pull/127061
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to