Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection/offsets incorrect when cgo is used #22

Open
joverbey opened this issue Sep 2, 2015 · 1 comment
Open

Selection/offsets incorrect when cgo is used #22

joverbey opened this issue Sep 2, 2015 · 1 comment

Comments

@joverbey
Copy link
Member

joverbey commented Sep 2, 2015

When a file includes cgo code, the Go Doctor appears to map the user's selection to a completely incorrect AST node. This is because tokens' reported offsets do not correspond to the actual locations of the tokens in the original source file (probably due to cgo preprocessing). Tokens' line/column information is correct--it does match the original locations in the file--but the offsets appear to be quite different.

@joverbey
Copy link
Member Author

A different issue (for Extract Function) had these two examples of problems from sqlite3 -- haven't checked, but sounds like this same issue (?):

db.go -- extraction has problem with position in cgo files
merge_operator.go -- try to rename a C.char parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant