tools/go/analysis
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
..
analysistest go/analysis/cmd/analyze: install all analyzers 2018-10-19 17:03:54 +00:00
cmd go/analysis/internal/unitchecker: a 'go vet'-compatible driver 2018-11-02 17:49:05 +00:00
internal go/packages, go/analysis/internal/unitchecker: skip broken tests for now 2018-11-08 18:34:11 +00:00
multichecker go/analysis/internal/unitchecker: a 'go vet'-compatible driver 2018-11-02 17:49:05 +00:00
passes go/analysis/passes/cgocall: analyze raw cgo files (again) 2018-11-08 19:39:40 +00:00
printf go/analysis/passes/printf: create printf pass 2018-10-15 19:09:06 +00:00
singlechecker go/analysis/internal/analysisflags: common flag handling 2018-10-19 17:43:12 +00:00
analysis.go go/analysis: write package documentation 2018-10-08 17:31:26 +00:00
doc.go go/analysis/cmd/vet: new name for cmd/analyze 2018-10-19 18:46:07 +00:00
validate.go go/analysis: validate: report duplicates among analyzers (roots) 2018-10-11 19:55:00 +00:00