Skip to content

Commit

Permalink
Use clang_getFileLocation instead of clang_getSpellingLocation
Browse files Browse the repository at this point in the history
Both had the same behavior... until llvm/llvm-project@2e770ed
which fixed getSpellingLocation, but bindgen looks like it actually expects
the getFileLocation result.
  • Loading branch information
glandium authored and pvdrz committed Oct 3, 2024
1 parent 62859b2 commit 35f0f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ impl SourceLocation {
let mut line = 0;
let mut col = 0;
let mut off = 0;
clang_getSpellingLocation(
clang_getFileLocation(
self.x, &mut file, &mut line, &mut col, &mut off,
);
(File { x: file }, line as usize, col as usize, off as usize)
Expand Down

0 comments on commit 35f0f9a

Please sign in to comment.