john.brawn planned changes to this revision.
john.brawn added a comment.

The clang-tidy failures in pre-merge are because

- clang-tidy tests use the compile database from building llvm (though you have 
to manually copy it otherwise the tests silently pass without actually running 
the test, which is why I wasn't seeing this locally)
- this has -D_GNU_SOURCE because llvm/cmake/config-ix.cmake adds it to the 
defines
- clang predefines _GNU_SOURCE when compiling C++ (for certain targets)
- therefore we get the warning for a redefined builtin

I'm not sure yet what the best fix is here. gcc has the same behaviour of 
defining _GNU_SOURCE for C++, but does it by adding -D_GNU_SOURCE to the cc1 
command line so it doesn't give a warning on redefine, but it doesn't look like 
copying this behaviour in clang would be easy. I'll think about this some more.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144654/new/

https://reviews.llvm.org/D144654

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to