### Environment - OS and Version: Ubuntu 23.10 - VS Code Version: 1.88.1 - C/C++ Extension Version: 1.19.9 - If using SSH remote, specify OS of remote machine: no ### Bug Summary and Steps to Reproduce Unexpected errors with code using designated initializer https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers: ```cpp struct A { explicit A() = default; }; struct B { A a; std::string str; }; void foo() { std::string_view other; [[maybe_unused]] B b{.a{}, .str{other}}; } ```   ### Configuration and Logs ```shell { "configurations": [ { "name": "Linux", "includePath": [ "${workspaceFolder}/**" ], "defines": [], "compilerPath": "/usr/bin/clang++", "cStandard": "c17", "cppStandard": "c++20", "intelliSenseMode": "clang-x64", "compileCommands": "path/to/my/compile_commands.json" } ], "version": 4 } ``` ### Other Extensions _No response_ ### Additional context _No response_
Activity
sean-mcmanus commentedon Apr 22, 2024
grishalipenko (@grishalipenko) I've reported VS bugs https://developercommunity.visualstudio.com/t/C-IntelliSense-incorrectly-reports-E0/10643601 and https://developercommunity.visualstudio.com/t/C-IntelliSense-incorrectly-reports-err/10643609 to track these issues (for our shared IntelliSense code). FYI, the string code doesn't compile with gcc, but it does with clang and cl.exe so the IntelliSense errors are incorrect still, although I'm not sure which compilers are behaving correctly, i.e. it could be a gcc bug too.
sean-mcmanus commentedon Jan 10, 2025
grishalipenko (@grishalipenko) Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.23.3 (pre-release).