[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 08:50:23 PST 2017

smeenai added a comment.

@mclow.lists are you okay with this approach? I'm also fine using a cast to silence the warning, as @zturner suggested, but we should suppress the warning in some way, otherwise libc++ 6 is gonna have compile warnings with clang 6 out of the box, which isn't great.

A third alternative, which is the least invasive, though not complete in some sense: we just add `-Wno-tautological-constant-compare` to the compile flags for libc++ (in CMake), to suppress the warning during libc++'s compilation. There's still an instance of the warning in a header, but all other clients of the header should treat it as a system header (in which case warnings will be suppressed anyway). It's not targeted at all and could suppress legitimate instances of the warning though.

  rCXX libc++


More information about the cfe-commits mailing list