go/analysis/passes/framepointer: don't report on runtime package

Skip the runtime package as it does lots of stack switching that
causes false positives.

Change-Id: I001c5750db9f53b270073a05b4ae322141f4c49a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/275518
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Keith Randall 2020-12-04 15:48:42 -08:00
parent 5737becde9
commit de58e7c01d
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
// Find assembly files to work on.
var sfiles []string
for _, fname := range pass.OtherFiles {
if strings.HasSuffix(fname, ".s") {
if strings.HasSuffix(fname, ".s") && pass.Pkg.Path() != "runtime" {
sfiles = append(sfiles, fname)
}
}