vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

intelliSenseCacheSize != 0 causes newly added headers to not be used by IntelliSense in certain cases

Open sean-mcmanus opened this issue 1 year ago • 1 comments

Simple repro is

#include "string"
int main()
{
    return std::string().size();
}

and then add a "string" file. The string from the system library is still used instead of the newly added workspace string file -- it becomes fixed if the C_Cpp.intelliSenseCachePath is changed to 0, otherwise, reload window doesn't fix the issue.

The strange thing is renaming string to string2 causes it to correctly update to using the system string file, but then renaming it back to string causes it to not switch back to the workspace string file.

sean-mcmanus avatar Aug 09 '24 22:08 sean-mcmanus

I repro the same bug using only local files and doing a rename to make with the root or sub header be picked up. In the screenshot, the IntelliSense cache is incorrectly causing the sub version of the header to be used.

image

sean-mcmanus avatar Aug 09 '24 23:08 sean-mcmanus

This seems like a limited impact issue. I don't think we get to this one.

bobbrow avatar May 29 '25 18:05 bobbrow