Smattr / clink

a modern re-implementation of Cscope
The Unlicense
43 stars 2 forks source link

macOS: stdbool.h not found #96

Closed Smattr closed 2 years ago

Smattr commented 2 years ago

I've been trying to debug why Clink cannot seem to recognise calls to span_eq in parse_c.c even when supplied with an accurate compile_commands.json. Surprisingly the answer seems to be that the header stdbool.h is missing. If you turn on libclang diagnostics, it complains (correctly) that it can't find stdbool.h. Because of this, it gives up on anything using booleans, like span_eq.

This is a little mysterious because the compile_commands.json command compiles the source perfectly fine, yet it too should be stymied by the lack of stdbool.h. I suspect what is going on here is some pre-compiled not-on-disk libraries/header in macOS or XCode. This is a little frustrating, because there's probably no adequate workaround for libclang when there literally may be no stdbool.h to point it at.