Environment
- OS and Version: Linux, Ubuntu 24.04
- VS Code Version: 1.116.0
- C/C++ Extension Version: 1.31.5
- If using SSH remote, specify OS of remote machine: no
Bug Summary and Steps to Reproduce
Bug Summary:
The InteliSense output doesn't pars consteval correctly. Mose hover-over doesn't work for values of a struct returned by consteval.
Steps to reproduce:
#include <array>
#include <cstddef>
#include <cstdint>
#include <string_view>
namespace demo {
struct Register_t {
std::string_view name;
std::int64_t address;
};
inline constexpr auto registers = std::array{
Register_t{"register_name", 0x1000},
};
template <std::size_t N>
consteval const Register_t& find_register(std::string_view name, const std::array<Register_t, N>& regs) {
for (const auto& reg : regs) {
if (reg.name == name) {
return reg;
}
}
throw "Register not found";
}
consteval const Register_t& get_register(std::string_view name) { return find_register(name, registers); }
} // namespace demo
static constexpr std::int64_t register_address = demo::get_register("register_name").address;
static_assert(demo::get_register("register_name").address == 0x1000);
static_assert(register_address == 0x1000);
The mouse hover-over of demo::get_register("register_name").address just return int64_t demo::Register_t::address instead of the expected value 0x1000 as it is done through the assigned value in register_address
Expected behavior:
Mouse hover-over on demo::get_register("register_name").address shows also the value.
It seems that the behavior isn't that stable, means that some times the value is returned and sometimes not. e.g. in Version 1.29.3 the values are shown when it is used for template initialization.
Configuration and Logs
Other Extensions
ms-vscode.cmake-tools
ms-vscode.cpptools-themes
ms-vscode.cpptools-extension-pack
ms-vscode.cpp-devtools
Additional context
No response
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
The InteliSense output doesn't pars consteval correctly. Mose hover-over doesn't work for values of a struct returned by consteval.
Steps to reproduce:
The mouse hover-over of
demo::get_register("register_name").addressjust returnint64_t demo::Register_t::addressinstead of the expected value0x1000as it is done through the assigned value inregister_addressExpected behavior:
Mouse hover-over on
demo::get_register("register_name").addressshows also the value.It seems that the behavior isn't that stable, means that some times the value is returned and sometimes not. e.g. in Version 1.29.3 the values are shown when it is used for template initialization.
Configuration and Logs
Other Extensions
ms-vscode.cmake-tools
ms-vscode.cpptools-themes
ms-vscode.cpptools-extension-pack
ms-vscode.cpp-devtools
Additional context
No response