cgo: improve error locations for cgo-constructed AST

This is mostly useful for debugging missing type conversions in CGo.
With this change, errors will have the correct source location in C
files.
This commit is contained in:
Ayke van Laethem
2019-04-20 16:55:55 +02:00
committed by Ron Evans
parent 2f2d62cc0c
commit 8e7ea92d44
3 changed files with 79 additions and 31 deletions
+8
View File
@@ -44,3 +44,11 @@ int tinygo_clang_Cursor_getNumArguments(CXCursor c) {
CXCursor tinygo_clang_Cursor_getArgument(CXCursor c, unsigned i) {
return clang_Cursor_getArgument(c, i);
}
CXSourceLocation tinygo_clang_getCursorLocation(CXCursor c) {
return clang_getCursorLocation(c);
}
CXTranslationUnit tinygo_clang_Cursor_getTranslationUnit(CXCursor c) {
return clang_Cursor_getTranslationUnit(c);
}