Skip to content

Duplicate include suggestions are provided that resolve to the same file #11594

@sean-mcmanus

Description

@sean-mcmanus

Use an includePath of ${workspaceFolder} and ${workspaceFolder}/sub.

Use test1.cpp code

#include "sub/sub1.h"

int main()
{
    return sub1();
}

With sub1.h

#if 0
int sub1();
#endif

Bug: It incorrectly suggests to add "sub1.h" when that already is included via #include "sub/sub1.h due to the includePath item ${workspaceFolder}/sub. This bug doesn't repro with VS.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions