AaronBallman wrote:

> > There are some related test failures caught by precommit CI that need to be 
> > addressed.
> > The issue in dr18xx.cpp looks to be a case where we should replace `bool b 
> > = ` with `auto b = ` (it doesn't change the testing for what's discussed in 
> > http://wg21.link/cwg1837).
> 
> Changing `bool b = ` to `auto b =` does not compile, as the compiler 
> complains that `auto` is not allowed in non-static struct members. `b` cannot 
> be declared as `static` either, which would cause an invalid use of `this` 
> outside of a non-static member function. It looks like type deduction using 
> auto for member variables is not allowed.

Yeah, another think-o on my part. I think it's fine to add the expected 
diagnostic to the file instead of silencing the warning.

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

Reply via email to