EricWF added a comment. In https://reviews.llvm.org/D44883#1055018, @Quuxplusone wrote:
> @EricWF, is it important IYO that this warning not trigger in unevaluated > contexts even for non-dependently-typed variables? > This is the case that seems to be coming up in practice in libc++ tests, but > is hard to reason about because it's "only" deliberately contrived test code. > > auto foo(std::exception& value) > noexcept(noexcept(value = value)) // ok to diagnose? > -> decltype(value = value) // ok to diagnose? > { > static_assert(noexcept(value = value)); // ok to diagnose? > } I don't think any of those cases should produce a warning. Self assignment doesn't actually take place, so it shouldn't produce a warning about a potential self-assignment. Repository: rC Clang https://reviews.llvm.org/D44883 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits