Bug ocide: browse to definition misses context
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 16
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Within LADSoft/OrangeC#168 there are many sources in the project "libcob" which have variables defined in the function header. The same variable name is also defined in the file cobc/cobc.h which even belongs to a completely other project "cobc" - and this is used as current target for browse definition.
Example: libcob/fileio.c, cob_fd_file_open():
static int
cob_fd_file_open (cob_file *f, char *filename, const int mode, const int sharing) // line 1252
{
/// some stuff here
if (access (filename, F_OK) && errno == ENOENT) { // line 1272
browse to definition on filename in line 1272 should obviously jump to line 1252, but it jumps to the definition of the struct filename in cobc/cobc.h.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the browse-to-definition case using libcob/fileio.c, especially cob_fd_file_open() around lines 1252-1272, and compare it with the conflicting definition in cobc/cobc.h. Start by tracing how OCIDE resolves the filename reference; done means browsing from line 1272 selects the function parameter at line 1252 rather than the unrelated struct definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100