================
@@ -27,7 +27,7 @@ int const_use(const int i);
 void f(int a) {
   int i;
   const_ref_use(i);             // expected-warning {{variable 'i' is 
uninitialized when passed as a const reference argument here}}
-  int j = j + const_ref_use(j); // expected-warning {{variable 'j' is 
uninitialized when used within its own initialization}} expected-warning 
{{variable 'j' is uninitialized when passed as a const reference argument here}}
+  int j = j + const_ref_use(j); // expected-warning {{variable 'j' is 
uninitialized when used within its own initialization}}
----------------
zygoloid wrote:

It'd be nice to also have a non-self-init test where the same variable has both 
a const ref use and other kinds of use, to make sure we properly prioritize the 
diagnostics.

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

Reply via email to