Skip to content

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

Open
@Crzyrndm

Description

@Crzyrndm

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions