Skip to content

Find All References fails for variables on the last line of a file if there's no newline #4150

@sean-mcmanus

Description

@sean-mcmanus

Do find all references on "abc1" in the code below:

int abc1 = 0;
int abc2 = abc1;

Bug: In the "C/C++ References" section it incorrectly gives

[Cannot confirm reference] test.cpp:1:20 int abc1 = 0;
int abc2 = abc1;

This seems like a corner case that no users would likely hit in normal code -- however, it's possible the root bug could be causing other issues so it might be worth investigating. It is worked around by adding a new line to the end of the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions