Language Server hallucinates errors
Environment
- OS and Version: I'm on Windows 11, but I'm running VS Code in WSL2 (Ubuntu 22.04).
- VS Code Version: 1.93.1
- C/C++ Extension Version: 1.22.7
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
This isn't consistent so I can't give a good reproduction, but sometimes when I open certain files the language server invents an issue to get mad at. As shown in the screenshot below, it's complaining about a mismatched { on line 37, character 3, but line 37 only has two characters. If I close all editors and reopen this file, there is no error; if I restarted the extension without closing the file, the error came back as soon as the extension was online.
It also said "expected a declaration" at one point with no further notes, but I didn't get a screenshot of that.
Steps to reproduce:
- Open a file with a C++ class definition
- Scroll down to the
}; - Observe error squiggles
Expected behavior:
No error
Configuration and Logs
I can't put it here because if I do, GitHub gives me the error
> Comment is too long (maximum is 65536 characters)
It seems to be searching the node_modules of a subdirectory for includes, which is why the log output is so long. If need be, I can upload it as a .txt file.
Other Extensions
While I do have a decent number of extensions (22 total), I don't think any of them affect C/C++ error squiggles.
Additional context
No response
@bbrk24 I think we need more repro info. This might be fixed with our pending 1.22.8 from https://github.com/microsoft/vscode-cpptools/issues/12175 .
Yeah, I can't reproduce this anymore (1.22.9).