Merge "Disable dtor inlining for clang-tidy"
am: 5e011a2531
Change-Id: I40e7ba8727a5e8f1b79193aef308b3f9b8a4c899
This commit is contained in:
18
cc/tidy.go
18
cc/tidy.go
@@ -83,9 +83,21 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
flags.TidyFlags = append(flags.TidyFlags, "-extra-arg-before=-fno-caret-diagnostics")
|
||||
}
|
||||
|
||||
// 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__")
|
||||
extraArgFlags := []string{
|
||||
// We might be using the static analyzer through clang tidy.
|
||||
// https://bugs.llvm.org/show_bug.cgi?id=32914
|
||||
"-D__clang_analyzer__",
|
||||
|
||||
// A recent change in clang-tidy (r328258) enabled destructor inlining, which
|
||||
// appears to cause a number of false positives. Until that's resolved, this turns
|
||||
// off the effects of r328258.
|
||||
// https://bugs.llvm.org/show_bug.cgi?id=37459
|
||||
"-Xclang", "-analyzer-config", "-Xclang", "c++-temp-dtor-inlining=false",
|
||||
}
|
||||
|
||||
for _, f := range extraArgFlags {
|
||||
flags.TidyFlags = append(flags.TidyFlags, "-extra-arg-before="+f)
|
||||
}
|
||||
|
||||
tidyChecks := "-checks="
|
||||
if checks := ctx.Config().TidyChecks(); len(checks) > 0 {
|
||||
|
Reference in New Issue
Block a user