microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.54k stars 1.56k forks source link

Intellisense does not recognize arm_neon intrinsics on macOS #11514

Open AlessandroToschi opened 1 year ago

AlessandroToschi commented 1 year ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary: On macOS with Xcode 14.3.1, the C++ intellisense is not able to recognize arm_neon intrinsics.

Steps to reproduce:

Copy this code:

#include "arm_neon.h"

int main(int argc, char** argv) {
  float32_t data[4] = {1.0f, 2.0f, 3.0f, 4.0f};
  float32x4_t x = vld1q_f32(data);

  return 0;
}

Error:

Screenshot 2023-10-09 at 11 48 12

Expected behavior: Intellisense should be able to recognize the builtin symbol.

Configuration and Logs

-------- Diagnostics - 10/9/2023, 11:49:41 AM
Version: 1.17.5
Current Configuration:
{
    "name": "Mac",
    "includePath": [
        "/Users/aleto/Documents/experiments/Math3D/**"
    ],
    "macFrameworkPath": [
        "/Applications/Xcode1431.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
    ],
    "cStandard": "c17",
    "defines": [
        "USE_NEON",
        "__LITTLE_ENDIAN__"
    ],
    "cppStandard": "c++17",
    "intelliSenseMode": "macos-clang-arm64",
    "intelliSenseModeIsExplicit": true,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": true,
    "mergeConfigurations": false,
    "compilerPath": "/usr/bin/clang++",
    "compilerPathIsExplicit": true,
    "browse": {
        "path": [
            "/Users/aleto/Documents/experiments/Math3D/**",
            "${workspaceFolder}"
        ]
    }
}
cpptools version (native): 1.17.5.0
No active translation units.

    "C_Cpp.default.cppStandard": "c++17",
    "C_Cpp.autocompleteAddParentheses": true,
    "C_Cpp.default.intelliSenseMode": "macos-clang-arm64",
    "C_Cpp.default.compilerPath": "/usr/bin/clang++",

Other Extensions

No response

Additional context

No response

browntarik commented 1 year ago

Does your code compile? If so, it may be the case that macos-clang-arm64 does not recognize arm_neon architecture and we could address that on our end.

If it does not compile, it may be the case that your compiler is not targeted to that version of arm_neon.

Please let me know what you conclude.

AlessandroToschi commented 1 year ago

Yes, it does compile using Xcode clang++.

LukeTheWalker commented 6 months ago

Any update on this? This still bugs me today