tinygo/loader
Ayke van Laethem 078dd9ff52 cgo: improve diagnostics
This makes CGo-emitted diagnostics very similar to regular errors
emitted while parsing/typechecking a package.
It's not complete, but after introducing some errors in testdata/cgo,
this is the resulting output:

    # ./testdata/cgo/
    testdata/cgo/main.h:18:11: error: a parameter list without types is only allowed in a function definition
    testdata/cgo/main.go:5:10: note: in file included from testdata/cgo/main.go!cgo.c:2:
    testdata/cgo/main.go:6:19: error: expected identifier or '('

Previously, this was the output:

    /home/ayke/src/github.com/tinygo-org/tinygo/testdata/cgo/main.h:18:11: error: a parameter list without types is only allowed in a function definition
    cgo-fake.c:3:19: error: expected identifier or '('
    # ./testdata/cgo/
    cgo: libclang cannot parse fragment
2019-04-11 10:11:09 +02:00
..
cgo.go cgo: improve diagnostics 2019-04-11 10:11:09 +02:00
errors.go loader: better error message on import cycles 2019-01-27 10:38:02 +01:00
libclang.go cgo: improve diagnostics 2019-04-11 10:11:09 +02:00
libclang_config.go all: switch to LLVM 8 2019-03-22 22:55:11 +01:00
loader.go cgo: improve diagnostics 2019-04-11 10:11:09 +02:00
ssa.go loader: switch to custom program loader 2018-12-10 15:36:23 +01:00