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 emilio committed Apr 29, 2024
1 parent 2013b8c commit 600f638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindgen/clang.rs
Expand Up @@ -1610,7 +1610,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 600f638

Please sign in to comment.