By default, most include paths passed to clang when using toolchains_llvm are passed as -isystem, which suppresses many warnings. This wasted a lot of time for me the other day when I accidentally declared a function with a bool return type and no return value. This is easily caught by clang under normal circumstances as I pass -Wall and -Werror, but due to the way headers are included, the warning/error never surfaced and it took hours to find.
For this target:
cc_libray(
name = "foo",
srcs=glob(["foo/*.cpp"]),
hdrs=glob(["foo/*.hpp"]),
)
I would expect things like -Wreturn-type violations in .hpp files to fail the build, but the way clang is currently invoked they don't.