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

IntelliSense not handling constexpr float types properly (starting from extension 1.17.2)

Open rsarrazin2 opened this issue 1 year ago • 4 comments

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:

  1. Clone the minimum viable example.
  2. Build it using the CMake extension (works probably as well when manually running CMake).
  3. Open example.cpp.
  4. If not happened automatically, run the "C/C++: Run Code Analysis on Active File" command.
  5. You'll see the 4 IntelliSense errors that aren't reported by the compiler:

image

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

Additional context

debug_output.log

rsarrazin2 avatar Aug 30 '23 08:08 rsarrazin2