vscode-cpptools
vscode-cpptools copied to clipboard
IntelliSense not handling constexpr float types properly (starting from extension 1.17.2)
Environment
- OS and Version: Ubuntu 20.04 @ WSL2
- VS Code Version: 1.81.1
- C/C++ Extension Version: >= 1.17.2
- If using SSH remote, specify OS of remote machine: WSL2 @ Windows 11
Bug Summary and Steps to Reproduce
Bug Summary: IntelliSense reports errors (at least on constexpr
literals) that the compiler doesn't.
Steps to reproduce:
- Clone the minimum viable example.
- Build it using the CMake extension (works probably as well when manually running CMake).
- Open example.cpp.
- If not happened automatically, run the "C/C++: Run Code Analysis on Active File" command.
- You'll see the 4 IntelliSense errors that aren't reported by the compiler:
Expected behavior:
- No Intellisense errors shall be displayed.
Notes:
- Interestingly the errors affect both float and double literals, and the 0 literal doesn't show the error.
- Reverting to any version < 1.17.2 (e.g. 1.16.3) solves the problem.
- Issue opened upon suggestion by @Colengms in #11351, in this comment.
Configuration and Logs
* No `c_cpp_properties.json` used
* No `C/C++: Log Diagnostics` command found
* Output from debug info with Debug log level: see file pasted in "Additional context"
Other Extensions
No response