[clang] [Clang][Sema]: Diagnose lambda to bool implicit casts (PR #83152)
Vinayak Dev via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 00:49:59 PST 2024
vinayakdsci 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.
https://github.com/llvm/llvm-project/pull/83152
More information about the cfe-commits
mailing list