Merge "Call clang-tidy with -quiet unless WITH_TIDY is set." am: 26e5a168bf

am: 0d21f37967

Change-Id: I51790c972596bde557d92ba50012a7cb89aba97f
This commit is contained in:
Chih-Hung Hsieh
2017-12-16 21:08:14 +00:00
committed by android-build-merger

View File

@@ -77,6 +77,11 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
flags.TidyFlags = append(flags.TidyFlags, headerFilter)
}
// If clang-tidy is not enabled globally, add the -quiet flag.
if !ctx.Config().ClangTidy() {
flags.TidyFlags = append(flags.TidyFlags, "-quiet")
}
// We might be using the static analyzer through clang tidy.
// https://bugs.llvm.org/show_bug.cgi?id=32914
flags.TidyFlags = append(flags.TidyFlags, "-extra-arg-before=-D__clang_analyzer__")