On 25 Jul 2016 6:29 p.m., "David Blaikie via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Should we fix the diagnostic? Or is the code triggering it just esoteric enough to not be a good justification for changing the warning?
Hmm, maybe we should. The case is something like template<typename T> void f(T t) { if (t) ... } with T being nullptr_t. That probably doesn't justify a warning. > On Tue, Jul 19, 2016 at 1:42 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: >> >> Author: rsmith >> Date: Tue Jul 19 15:35:09 2016 >> New Revision: 276022 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=276022&view=rev >> Log: >> Attempt to bring peace to -Werror buildbots. >> >> Modified: >> libcxxabi/trunk/test/catch_reference_nullptr.pass.cpp >> >> Modified: libcxxabi/trunk/test/catch_reference_nullptr.pass.cpp >> URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_reference_nullptr.pass.cpp?rev=276022&r1=276021&r2=276022&view=diff >> ============================================================================== >> --- libcxxabi/trunk/test/catch_reference_nullptr.pass.cpp (original) >> +++ libcxxabi/trunk/test/catch_reference_nullptr.pass.cpp Tue Jul 19 15:35:09 2016 >> @@ -12,6 +12,12 @@ >> #include <cassert> >> #include <cstdlib> >> >> +// Clang emits a warning on converting an object of type nullptr_t to bool, >> +// even in generic code. Suppress it. >> +#if defined(__clang__) >> +#pragma clang diagnostic ignored "-Wnull-conversion" >> +#endif >> + >> struct A {}; >> >> template<typename T, bool CanCatchNullptr> >> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits