Skip to content

Inconsistent output of Find All References  #5376

@vladzcloudius

Description

@vladzcloudius

Type: LanguageService

Describe the bug

  • OS and Version: Ubuntu 19.10
  • VS Code Version:
Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:50:03.709Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.6.6-050606-generic snap
  • C/C++ Extension Version: Version 0.27.0: March 30, 2020
  • Other extensions you installed (and if the issue persists after disabling them): None
  • Does this issue involve using SSH remote to run the extension on a remote machine?: No
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

Steps to reproduce

  1. git clone https://github.com/scylladb/scylla.git
  2. cd scylla
  3. git checkout 1f902302ad8d26f9db8c0622b3bcc844f07d4517
  4. git submodule update --init --recursive
  5. code .
  6. Open utils/loading_cache.hh
  7. Go to line 254: https://github.com/scylladb/scylla/blob/master/utils/loading_cache.hh#L254
  8. Find all references of class loading_cache.

It finds all but one reference (in authorized_prepared_statements_cache.hh):

image

  1. Go to a loading_cache class reference in the authorized_prepared_statements_cache.hh and look for all references again.
    This time it is going to find them all:

image

  1. Go back to loading_cache.hh and try to search for all references again. It is going to find no references at all:

image

At the same time Go To Definition always works as expected.

Expected behavior

It should find all references all times as in step (9) above.

  1. Logs from the command C/C++: Log Diagnostics:
-------- Diagnostics - 4/28/2020, 6:13:46 PM
Version: 0.27.0
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "${workspaceFolder}/**"
    ],
    "defines": [],
    "compilerPath": "/home/vladz/.local/bin/gcc",
    "intelliSenseMode": "clang-x64",
    "compilerArgs": [],
    "cStandard": "c11",
    "cppStandard": "c++20",
    "browse": {
        "path": [
            "${workspaceFolder}/**"
        ]
    }
}
Translation Unit Mappings:
[ /home/vladz/work/tmp/scylla/cql3/authorized_prepared_statements_cache.hh ]:
    /home/vladz/work/tmp/scylla/cql3/authorized_prepared_statements_cache.hh
    /home/vladz/work/tmp/scylla/utils/loading_cache.hh
Translation Unit Configurations:
[ /home/vladz/work/tmp/scylla/cql3/authorized_prepared_statements_cache.hh ]:
    Process ID: 31166
    Memory Usage: 1161 MB
    Compiler Path: /home/vladz/.local/bin/gcc
    Includes:
        /usr/include/c++/9
        /usr/include/x86_64-linux-gnu/c++/9
        /usr/include/c++/9/backward
        /usr/lib/gcc/x86_64-linux-gnu/9/include
        /usr/local/include
        /usr/lib/gcc/x86_64-linux-gnu/9/include-fixed
        /usr/include/x86_64-linux-gnu
        /usr/include
        /home/vladz/work/tmp/scylla
        /home/vladz/work/tmp/scylla/seastar/include
        /home/vladz/work/tmp/scylla/zstd/tests/regression
        /home/vladz/work/tmp/scylla/zstd/contrib/linux-kernel/include/linux
    Standard Version: c++20
    IntelliSense Mode: gcc-x64
    Other Flags:
        --g++
        --gnu_version=90201
        --header_only_fallback
Total Memory Usage: 1161 MB

  1. Logs from the language server:

Below is the log with a debug logging level when I tried to follow steps 7-10 above. However the tool was unable to find any reference in step 9.
(It looks like we were hitting some timeouts here. We may be hitting same timeouts in step 10 above too).

logs.txt

Screenshots
See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions