Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense crash - Catch REQUIRE macro and a vector<string> #13006

Open
Crzyrndm opened this issue Nov 28, 2024 · 0 comments
Open

Intellisense crash - Catch REQUIRE macro and a vector<string> #13006

Crzyrndm opened this issue Nov 28, 2024 · 0 comments
Labels
bug investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service reliability

Comments

@Crzyrndm
Copy link

Crzyrndm commented Nov 28, 2024

Environment

  • OS and Version: W11 Pro 23H2
  • VS Code Version: 1.95.3
  • C/C++ Extension Version: 1.22.11 and current pre-release
  • If using SSH remote, specify OS of remote machine: N/A

Bug Summary and Steps to Reproduce

#include <catch2/catch_test_macros.hpp>
#include <vector>
#include <string>
TEST_CASE("bug")
{
    std::vector<std::string> segs{"1", "2"};
    REQUIRE(segs == std::vector<std::string>{"1", ""});
}

When I setup to build this with ninja (1.12.1) + clang (17.0.6), the parser chokes on the above code. As long as there is >1 arguments to the temporary vector constructor intellisense is dead (it compiles fine though)

This is a minimal repro - see test/src/test.cpp
Intellisense crash.zip
NOTE requires a valid $Env:VCPKG_ROOT to be defined to acquire the catch test library but otherwise should be no dependencies

Configuration and Logs

IntelliSense update scheduled and TU acquisition started for: file:///c%3A/git/bug/tests/src/test.cpp
sending compilation args for C:\git\bug\tests\src\test.cpp
<--- all the platform includes/defines --->
  other: --clang
  other: --clang_version=170006
  other: --ms_compatibility
  stdver: c++20
  intelliSenseMode: windows-clang-x64
IntelliSense process crash detected: handle_update_intellisense
Shutting down IntelliSense server: C:\git\bug\tests\src\test.cpp
Update IntelliSense time (sec): 0.206
<--- repeat ^^ a number of times --->
IntelliSense update scheduled and TU acquisition started for: file:///c%3A/git/bug/tests/src/test.cpp
Failed to acquire a TU due to crash frequency: file:///c%3A/git/bug/tests/src/test.cpp
Update IntelliSense time (sec): 0.001

Other Extensions

I'm using ms-vscode.cmake-tools as the intellisense configuration provider

Additional context

No response

@sean-mcmanus sean-mcmanus added bug Language Service reliability investigate: repro This issue's repro steps needs to be investigated/confirmed labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service reliability
Projects
Status: No status
Development

No branches or pull requests

2 participants