Skip to content

Draft: bindgen: fix SourceLocation::location for libclang >= 19.1.0

Noisy Coil requested to merge NoisyCoil/debcargo-conf:fix-bindgen into master

As requested by Miguel Ojeda in pkg-rust-maintainers#049880, backported from bindgen!2842, tested to build and pass autopkgtests. From the PR description:

[clang_getFileLocation and clang_getSpellingLocation] had the same behavior... until llvm/llvm-project@2e770ed which fixed getSpellingLocation, but bindgen looks like it actually expects the getFileLocation result.

Since before libclang 19.1.0 the two functions should be the same, this change should not affect bindgen with libclang < 19.1.0 (i.e. bindgen in testing).

Merge request reports

Loading