The atomicalign checker detects non-64-bit aligned struct field arguments to sync/atomic functions but currently misses out cases where the struct variable identifier is a pointer to struct. This is very common as it happens when the 64-bit field is accessed in a method with pointer receiver, where the struct is itself the method receiver. Add some tests to cover that new case. While I'm at it, fix some typos. Change-Id: I582cf5b7286b11285010f085045f58dc636ef3ee Reviewed-on: https://go-review.googlesource.com/c/158999 Reviewed-by: Alan Donovan <adonovan@google.com> |
||
---|---|---|
.. | ||
asmdecl | ||
assign | ||
atomic | ||
atomicalign | ||
bools | ||
buildssa | ||
buildtag | ||
cgocall | ||
composite | ||
copylock | ||
ctrlflow | ||
findcall | ||
httpresponse | ||
inspect | ||
internal/analysisutil | ||
loopclosure | ||
lostcancel | ||
nilfunc | ||
nilness | ||
pkgfact | ||
printf | ||
shadow | ||
shift | ||
stdmethods | ||
structtag | ||
tests | ||
unmarshal | ||
unreachable | ||
unsafeptr | ||
unusedresult | ||
README |
README
This directory does not contain a Go package, but acts as a container for various analyses that implement the golang.org/x/tools/go/analysis API and may be imported into an analysis tool. By convention, each package foo provides the analysis, and each command foo/cmd/foo provides a standalone driver.