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

MSVC IntelliSense stops working after wasi-sdk-15 #381

Open
riverar opened this issue Feb 6, 2024 · 0 comments
Open

MSVC IntelliSense stops working after wasi-sdk-15 #381

riverar opened this issue Feb 6, 2024 · 0 comments

Comments

@riverar
Copy link

riverar commented Feb 6, 2024

MSVC C++ IntelliSense gets very confused with recent SDK versions. (Tested with Visual Studio 2019, 2022, and 2022 Preview builds.) Is this perhaps an upstream LLVM 14.0 issue?

(Variants of this issue appear in other MSVC projects that utilize wasi-sysroot but run through MSVC for IntelliSense.)

Steps to reproduce

  1. Create empty directory

  2. Download latest sysroot release (https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sysroot-21.0.tar.gz)

  3. Extract sysroot into [directory]\wasi-sysroot

  4. Create test.cpp with the following contents:

     #include <string>
     
     int main() {
         std::string test("hello");
     }
  5. Create CppProperties.json with the following contents:

    {
      "configurations": [
        {
          "name": "Repro",
          "includePath": [
            "${workspaceRoot}\\wasi-sysroot\\include",
            "${workspaceRoot}\\wasi-sysroot\\include\\c++\\v1",
            "${env.INCLUDE}"
          ],
          "intelliSenseMode": "windows-msvc-x64"
        }
      ]
    }
  6. Open Visual Studio > File > Open Folder > [folder path]

  7. Observe (after a bit of waiting), Visual Studio shows red squiggles™️on std::string usage

  8. Close Visual Studio

  9. Delete [folder]\.vs

  10. Edit CppProperties.json and change intelliSenseMode to windows-clang-x64

  11. Open Visual Studio > File > Open Folder > [folder path]

  12. Observe (after a bit of waiting), Visual Studio shows no squiggles™️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant