mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 03:03:27 +00:00
cgo: run CGo parser for all CGo fragments in a file
Previously, libclang was run on each fragment (import "C") separately. However, in regular Go it's possible for later fragments to refer to types in earlier fragments so they must have been parsed as one. This commit changes the behavior to run only one C parser invocation for each Go file.
This commit is contained in:
committed by
Ron Evans
parent
13891d428f
commit
cceb655874
Vendored
+3
@@ -19,6 +19,9 @@ typedef someType noType; // undefined type
|
||||
// #define SOME_CONST_4 8) // after some empty lines
|
||||
import "C"
|
||||
|
||||
// #warning another warning
|
||||
import "C"
|
||||
|
||||
// Make sure that errors for the following lines won't change with future
|
||||
// additions to the CGo preamble.
|
||||
//line errors.go:100
|
||||
|
||||
Reference in New Issue
Block a user