Skip to content

Commit

Permalink
go-fuzz-build: set position of BinaryExpr in sonar
Browse files Browse the repository at this point in the history
Fixes #294
  • Loading branch information
josharian authored and dvyukov committed Nov 14, 2020
1 parent 90825f3 commit d9fd818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go-fuzz-build/cover.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (s *Sonar) Visit(n ast.Node) ast.Visitor {
Args: []ast.Expr{v1, v2, &ast.BasicLit{Kind: token.INT, Value: strconv.Itoa(id)}},
},
},
&ast.ReturnStmt{Results: []ast.Expr{&ast.BinaryExpr{Op: nn.Op, X: v1, Y: v2}}},
&ast.ReturnStmt{Results: []ast.Expr{&ast.BinaryExpr{Op: nn.Op, X: v1, Y: v2, OpPos: nn.Pos()}}},
)
nn.X = &ast.CallExpr{
Fun: &ast.FuncLit{
Expand Down

0 comments on commit d9fd818

Please sign in to comment.