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

This commit is contained in:
Treehugger Robot
2017-12-16 21:02:06 +00:00
committed by Gerrit Code Review

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__")