Call clang-tidy with -fno-caret-diagnostics by default.

* clang -fno-caret-diagnostics
  suppresses warning source lines, carets, and
  the stats line of "n warnings generated"
* clang-tidy -extra-arg-before=-fno-caret-diagnotics
  only suppresses the "n warnings generated" line.
* Pass this flag and -quiet to clang-tidy when
  WITH_TIDY is not 1 or true.
* Remove redundant quotation marks around -extra-arg-before.

Bug: 69051430
Test: normal build and build with WITH_TIDY=1

Change-Id: I9021ee315edc977c15dda6ab246a00182f31fad1
This commit is contained in:
Chih-Hung Hsieh
2018-01-04 01:31:37 -08:00
parent ec728cbad0
commit 4d31b9da8c

View File

@@ -1721,13 +1721,13 @@ ifneq (,$(filter 1 true,$(my_tidy_enabled)))
endif
# If clang-tidy is not enabled globally, add the -quiet flag.
ifeq (,$(filter 1 true,$(WITH_TIDY)))
my_tidy_flags += -quiet
my_tidy_flags += -quiet -extra-arg-before=-fno-caret-diagnostics
endif
# We might be using the static analyzer through clang-tidy.
# https://bugs.llvm.org/show_bug.cgi?id=32914
ifneq ($(my_tidy_checks),)
my_tidy_flags += "-extra-arg-before=-D__clang_analyzer__"
my_tidy_flags += -extra-arg-before=-D__clang_analyzer__
endif
endif
endif