Exemple #1
0
// Retrieves the source location associated with a given character offset in a particular translation unit.
func (tu TranslationUnit) LocationForOffset(file File, offset uint32) SourceLocation {
	return SourceLocation{C.clang_getLocationForOffset(tu.c, file.c, C.uint(offset))}
}
Exemple #2
0
// LocationForOffset returns the source location associated with a given
// character offset in a particular translation unit.
func (tu TranslationUnit) LocationForOffset(f File, offset uint) SourceLocation {
	loc := C.clang_getLocationForOffset(tu.c, f.c, C.uint(offset))
	return SourceLocation{loc}
}