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> |
||
---|---|---|
.. | ||
analysis | ||
ast | ||
buildutil | ||
callgraph | ||
cfg | ||
expect | ||
gccgoexportdata | ||
gcexportdata | ||
internal | ||
loader | ||
packages | ||
pointer | ||
ssa | ||
types | ||
vcs |