Merge "Call clang-tidy with -quiet unless WITH_TIDY is set."

am: 26e5a168bf

Change-Id: I4835ae77e8b80ccee47866d934bd7632ee83574b
This commit is contained in:
Chih-Hung Hsieh
2017-12-16 21:05:42 +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__")