Do not pass -flto and -fsanitize flags to clang-tidy.

Some flags stop clang-tidy to search included header files.

Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: Ie1ac37298793c015286db0f5caa252b67f4db365
This commit is contained in:
Chih-Hung Hsieh 2018-07-26 15:00:28 -07:00
parent 667f688f36
commit 5942fe4fd1

View file

@ -22,8 +22,11 @@ import (
// clang-tidy doesn't recognize every flag that clang does. This is unlikely to
// be a complete list, but we can populate this with the ones we know to avoid
// issues with clang-diagnostic-unused-command-line-argument.
// b/111885396: -flto affected header include directory; -fsanitize needs -flto.
var ClangTidyUnknownCflags = sorted([]string{
"-Wa,%",
"-flto",
"-fsanitize=%",
})
func init() {