tools/go/analysis/passes
Alan Donovan e5d4b58ff5 go/analysis/passes/cgocall: analyze raw cgo files (again)
The cgocall analyzer was originally written in vet to analyze "raw" cgo files,
which are type-checked on a best-effort basis.  However, the go/analysis
API presents analyzers with "cooked" cgo files, which are well-typed
legal Go but obscure the relationship between a call C.f(...) and its arguments.
Prior to this CL, cgocall attempted to "uncook" the file, which was
as predictably fragile as it sounds, and it rapidly broke as the cgo
recipe evolved.

This change causes cgocall to parse, modify, type-check and analyze "raw"
cgo files. The approach (based on dot-importing the "cooked" package)
is rather too clever but should be more robust than the one it replaces.

Fixes golang/go#28566

Change-Id: I3092a313c64d27153eaaa115fe8635abfed17023
Reviewed-on: https://go-review.googlesource.com/c/147317
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-11-08 19:39:40 +00:00
..
asmdecl go/analysis/passes/asmdecl: fix nil deref panic 2018-10-19 16:56:31 +00:00
assign go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
atomic go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
bools go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
buildssa go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
buildtag go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
cgocall go/analysis/passes/cgocall: analyze raw cgo files (again) 2018-11-08 19:39:40 +00:00
composite go/analysis/passes/composite: add testing.Internal* to whitelist 2018-10-17 15:12:46 +00:00
copylock go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
ctrlflow go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
findcall go/analysis/cmd/analyze: install all analyzers 2018-10-19 17:03:54 +00:00
httpresponse go/analysis/passes/httpresponse: split out from vet 2018-10-16 19:47:10 +00:00
inspect go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
internal/analysisutil go/analysis/passes/assign: split out from vet 2018-10-08 20:59:24 +00:00
loopclosure go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
lostcancel go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
nilfunc go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
nilness go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
pkgfact go/analysis/internal/unitchecker: a 'go vet'-compatible driver 2018-11-02 17:49:05 +00:00
printf go/analysis/passes/printf: changes for analysis API 2018-10-16 19:44:49 +00:00
shadow go/analysis/passes/shadow: adapt for analysis API 2018-10-19 17:13:52 +00:00
shift go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
stdmethods go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
structtag go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
tests go/analysis/passes/tests: add testcase from vet 2018-10-19 16:56:12 +00:00
unreachable go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
unsafeptr go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
unusedresult go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
README go/analysis/internal/checker: analysis driver based on go/packages 2018-09-26 01:25:07 +00:00

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.