Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use -Wno-unknown-warning to simplify warnings
A gcc-specific warning option had been added (-Wsuggest-override). In theory this was guarded against being used with clang, but that didn't work if a compilation database was built with gcc and then used with e.g. clang-tidy. In that situation clang would complain about the unrecognized warning. The suggested workaround in the DEVELOPER_TOOLING docs was to add -Wno-unknown-warning-option, a clang option to suppress such warnings. However, we might as well just add that option always, then we don't need to make the -Wsuggest-override conditional and the build logic is simplified. Technically, gcc has no such option, but gcc doesn't complain about unrecognized disabled warning options (unless there's another error) so we get lucky there. Hopefully that remains true back to our earliest supported gcc. This might cause problems for compiling with another compiler e.g. icc, but the way the Makefile was written, it would have had that problem anyway, since it was added for any non-clang compiler.
- Loading branch information