diff options
Diffstat (limited to 'cgo/libclang.go')
-rw-r--r-- | cgo/libclang.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cgo/libclang.go b/cgo/libclang.go index 1cbc78c44..514e5326f 100644 --- a/cgo/libclang.go +++ b/cgo/libclang.go @@ -255,6 +255,11 @@ func tinygo_clang_globals_visitor(c, parent C.GoCXCursor, client_data C.CXClient // Parsing was successful. p.constants[name] = constantInfo{expr, pos} } + case C.CXCursor_EnumDecl: + // Visit all enums, because the fields may be used even when the enum + // type itself is not. + typ := C.tinygo_clang_getCursorType(c) + p.makeASTType(typ, pos) } return C.CXChildVisit_Continue } |