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 wrong structured binding error #13291

Open
AlexB8675 opened this issue Feb 18, 2025 · 1 comment
Open

Intellisense wrong structured binding error #13291

AlexB8675 opened this issue Feb 18, 2025 · 1 comment
Labels
bug Language Service Visual Studio Inherited from Visual Studio

Comments

@AlexB8675
Copy link

AlexB8675 commented Feb 18, 2025

Environment

  • OS and Version: Windows 11, 24H2
  • VS Code Version: 1.97.2 (e54c774e0add60467559eb0d1e229c6452cf8447)
  • C/C++ Extension Version: 1.23.6

Bug Summary and Steps to Reproduce

Bug Summary: Intellisense gives an error on structured binding declaration on legal code, specifically the error is std::tuple_size<"const Typename">::value is not a valid integral constant-expression, there is an existing issue already #2597 for this same error and it is reported as completed, however this still persists, with a slight difference. The original bug report's code works fine, however including any header will cause the error to reapper.

Steps to reproduce:

  1. Create a new CMake project
cmake_minimum_required(VERSION 3.30)
project(Test)

add_executable(Test)
target_sources(Test PRIVATE main.cpp)

set_target_properties(Test PROPERTIES
  CXX_STANDARD 23
  CXX_STANDARD_REQUIRED ON
)
  1. Write the following C++ code
#include <iostream>

struct Point {
  int x;
  int y;
};

const auto [x, y] = Point(1, 2);
  1. Error will appear near the structured binding declaration as std::tuple_size<"const Point">::value is not a valid integral constant-expression

Expected behavior:
No error should appear, code is perfectly legal as per the C++17 and newer standards

Configuration and Logs

The only active configuration is

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "D:\\LLVM\\bin\\clang-cl.exe",
            "configurationProvider": "ms-vscode.cmake-tools",
            "cStandard": "c23",
            "cppStandard": "c++23",
            "intelliSenseMode": "windows-clang-x64"
        }
    ],
    "version": 4
}

Logs from the extension:

-------- Diagnostics - 2/18/2025, 2:12:05 PM
Version: 1.23.6
Current Configuration:
{
    "name": "Win32",
    "includePath": [
        "c:/Users/User/Desktop/X/**"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
    ],
    "compilerPath": "D:\\LLVM\\bin\\clang-cl.exe",
    "configurationProvider": "ms-vscode.cmake-tools",
    "cStandard": "c23",
    "cppStandard": "c++23",
    "intelliSenseMode": "windows-clang-x64",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerPathInCppPropertiesJson": "D:\\LLVM\\bin\\clang-cl.exe",
    "configurationProviderInCppPropertiesJson": "ms-vscode.cmake-tools",
    "mergeConfigurations": false,
    "browse": {
        "path": [
            "c:/Users/User/Desktop/X/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Modified Settings:
{
    "C_Cpp.default.intelliSenseMode": "windows-clang-x64",
    "C_Cpp.default.cStandard": "c23",
    "C_Cpp.default.cppStandard": "c++23",
    "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}
Additional Tracked Settings:
{
    "editorTabSize": 2,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {},
    "filesExclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true
    },
    "filesAutoSaveAfterDelay": false,
    "editorInlayHintsEnabled": false,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },
    "workbenchSettingsEditor": "ui"
}
Custom browse configuration: 
{
    "browsePath": [
        "c:/users/user/desktop/x"
    ],
    "compilerPath": "d:/llvm/bin/clang-cl.exe",
    "compilerArgs": [],
    "compilerFragments": [
        "/DWIN32 /D_WINDOWS /EHsc /O2 /Ob2 /DNDEBUG -clang:-std=c++23 -MD"
    ]
}
cpptools version (native): 1.23.6.0
Current database path: C:\USERS\USER\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\6B67C83B80FDA6B034FB959601C697D4\.BROWSE.VC.DB
Translation Unit Mappings:
[ C:\Users\User\Desktop\X\main.cpp - source TU]:
Translation Unit Configurations:
[ C:\Users\User\Desktop\X\main.cpp ]
    Process ID: 21820
    Memory Usage: 202 MB
    Compiler Path: D:\LLVM\bin\clang-cl.exe
    Includes:
    System Includes:
        D:\LLVM\lib\clang\19\include
        D:\Programs\Microsoft\Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include
        D:\Programs\Microsoft\Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt
    Defines:
        WIN32
        _WINDOWS
        NDEBUG
    Standard Version: c++23
    IntelliSense Mode: windows-clang-x64
    Other Flags:
        --clang
        --clang_version=190100
        --ms_compatibility
Total Memory Usage: 202 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 5433

LSP Logs:
LSP: (received) cpptools/didChangeActiveEditor: file:///c%3A/Users/User/Desktop/X/main.cpp
LSP: (invoked) cpptools/didChangeActiveEditor: file:///c%3A/Users/User/Desktop/X/main.cpp
LSP: (received) textDocument/willSaveWaitUntil: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 224)
LSP: (invoked) textDocument/willSaveWaitUntil: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 224)
LSP: Sending response (id: 224)
willSaveWaitUntil: 0ms
LSP: (received) textDocument/didSave: file:///c%3A/Users/User/Desktop/X/main.cpp
LSP: (invoked) textDocument/didSave: file:///c%3A/Users/User/Desktop/X/main.cpp
Intellisense update pending for: file:///c%3A/Users/User/Desktop/X/main.cpp
tag parsing file: C:\Users\User\Desktop\X\main.cpp
LSP: (received) cpptools/fileChanged: file:///c%3A/Users/User/Desktop/X/main.cpp
LSP: (invoked) cpptools/fileChanged: file:///c%3A/Users/User/Desktop/X/main.cpp
IntelliSense update scheduled and TU acquisition started for: file:///c%3A/Users/User/Desktop/X/main.cpp
Update IntelliSense time (sec): 0.105
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 225)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 225)
LSP: Sending response (id: 225)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 226)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 226)
LSP: Sending response (id: 226)
Database safe to open.
LSP: (received) cpptools/restartIntelliSenseForFile: file:///c%3A/Users/User/Desktop/X/main.cpp
LSP: (invoked) cpptools/restartIntelliSenseForFile: file:///c%3A/Users/User/Desktop/X/main.cpp
Shutting down IntelliSense server: C:\Users\User\Desktop\X\main.cpp
Intellisense update pending for: file:///c%3A/Users/User/Desktop/X/main.cpp
IntelliSense update scheduled and TU acquisition started for: file:///c%3A/Users/User/Desktop/X/main.cpp
sending compilation args for C:\Users\User\Desktop\X\main.cpp
  system include: D:\LLVM\LIB\CLANG\19\INCLUDE
  system include: D:\PROGRAMS\MICROSOFT\VISUAL STUDIO\2022\ENTERPRISE\VC\TOOLS\MSVC\14.43.34808\INCLUDE
  system include: D:\PROGRAMS\MICROSOFT\VISUAL STUDIO\2022\ENTERPRISE\VC\TOOLS\MSVC\14.43.34808\ATLMFC\INCLUDE
  system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UCRT
  system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\SHARED
  system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\UM
  system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\WINRT
  system include: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.22621.0\CPPWINRT
  define: _CPPRTTI=1
  define: _CPPUNWIND=1
  define: _DLL=1
  define: _HAS_CHAR16_T_LANGUAGE_SUPPORT=1
  define: _INTEGRAL_MAX_BITS=64
  define: _MSC_BUILD=1
  define: _MSC_EXTENSIONS=1
  define: _MSC_FULL_VER=194334808
  define: _MSC_VER=1943
  define: _MSVC_CONSTEXPR_ATTRIBUTE=1
  define: _MSVC_EXECUTION_CHARACTER_SET=65001
  define: _MSVC_LANG=202004L
  define: _MT=1
  define: _M_AMD64=100
  define: _M_FP_CONTRACT=1
  define: _M_FP_PRECISE=1
  define: _M_X64=100
  define: _NATIVE_NULLPTR_SUPPORTED=1
  define: _NATIVE_WCHAR_T_DEFINED=1
  define: _RVALUE_REFERENCES_SUPPORTED=1
  define: _RVALUE_REFERENCES_V2_SUPPORTED=1
  define: _WCHAR_T_DEFINED=1
  define: _WIN32=1
  define: _WIN64=1
  define: __ATOMIC_ACQUIRE=2
  define: __ATOMIC_ACQ_REL=4
  define: __ATOMIC_CONSUME=1
  define: __ATOMIC_RELAXED=0
  define: __ATOMIC_RELEASE=3
  define: __ATOMIC_SEQ_CST=5
  define: __BIGGEST_ALIGNMENT__=16
  define: __BITINT_MAXWIDTH__=8388608
  define: __BOOL_DEFINED=1
  define: __BOOL_WIDTH__=8
  define: __BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__
  define: __CHAR16_TYPE__=unsigned short
  define: __CHAR32_TYPE__=unsigned int
  define: __CHAR_BIT__=8
  define: __CLANG_ATOMIC_BOOL_LOCK_FREE=2
  define: __CLANG_ATOMIC_CHAR16_T_LOCK_FREE=2
  define: __CLANG_ATOMIC_CHAR32_T_LOCK_FREE=2
  define: __CLANG_ATOMIC_CHAR8_T_LOCK_FREE=2
  define: __CLANG_ATOMIC_CHAR_LOCK_FREE=2
  define: __CLANG_ATOMIC_INT_LOCK_FREE=2
  define: __CLANG_ATOMIC_LLONG_LOCK_FREE=2
  define: __CLANG_ATOMIC_LONG_LOCK_FREE=2
  define: __CLANG_ATOMIC_POINTER_LOCK_FREE=2
  define: __CLANG_ATOMIC_SHORT_LOCK_FREE=2
  define: __CLANG_ATOMIC_WCHAR_T_LOCK_FREE=2
  define: __CONSTANT_CFSTRINGS__=1
  define: __DBL_DECIMAL_DIG__=17
  define: __DBL_DENORM_MIN__=4.9406564584124654e-324
  define: __DBL_DIG__=15
  define: __DBL_EPSILON__=2.2204460492503131e-16
  define: __DBL_HAS_DENORM__=1
  define: __DBL_HAS_INFINITY__=1
  define: __DBL_HAS_QUIET_NAN__=1
  define: __DBL_MANT_DIG__=53
  define: __DBL_MAX_10_EXP__=308
  define: __DBL_MAX_EXP__=1024
  define: __DBL_MAX__=1.7976931348623157e+308
  define: __DBL_MIN_10_EXP__=(-307)
  define: __DBL_MIN_EXP__=(-1021)
  define: __DBL_MIN__=2.2250738585072014e-308
  define: __DBL_NORM_MAX__=1.7976931348623157e+308
  define: __DECIMAL_DIG__=__LDBL_DECIMAL_DIG__
  define: __DEPRECATED=1
  define: __FINITE_MATH_ONLY__=0
  define: __FLT16_DECIMAL_DIG__=5
  define: __FLT16_DENORM_MIN__=5.9604644775390625e-8F16
  define: __FLT16_DIG__=3
  define: __FLT16_EPSILON__=9.765625e-4F16
  define: __FLT16_HAS_DENORM__=1
  define: __FLT16_HAS_INFINITY__=1
  define: __FLT16_HAS_QUIET_NAN__=1
  define: __FLT16_MANT_DIG__=11
  define: __FLT16_MAX_10_EXP__=4
  define: __FLT16_MAX_EXP__=16
  define: __FLT16_MAX__=6.5504e+4F16
  define: __FLT16_MIN_10_EXP__=(-4)
  define: __FLT16_MIN_EXP__=(-13)
  define: __FLT16_MIN__=6.103515625e-5F16
  define: __FLT16_NORM_MAX__=6.5504e+4F16
  define: __FLT_DECIMAL_DIG__=9
  define: __FLT_DENORM_MIN__=1.40129846e-45F
  define: __FLT_DIG__=6
  define: __FLT_EPSILON__=1.19209290e-7F
  define: __FLT_HAS_DENORM__=1
  define: __FLT_HAS_INFINITY__=1
  define: __FLT_HAS_QUIET_NAN__=1
  define: __FLT_MANT_DIG__=24
  define: __FLT_MAX_10_EXP__=38
  define: __FLT_MAX_EXP__=128
  define: __FLT_MAX__=3.40282347e+38F
  define: __FLT_MIN_10_EXP__=(-37)
  define: __FLT_MIN_EXP__=(-125)
  define: __FLT_MIN__=1.17549435e-38F
  define: __FLT_NORM_MAX__=3.40282347e+38F
  define: __FLT_RADIX__=2
  define: __FPCLASS_NEGINF=0x0004
  define: __FPCLASS_NEGNORMAL=0x0008
  define: __FPCLASS_NEGSUBNORMAL=0x0010
  define: __FPCLASS_NEGZERO=0x0020
  define: __FPCLASS_POSINF=0x0200
  define: __FPCLASS_POSNORMAL=0x0100
  define: __FPCLASS_POSSUBNORMAL=0x0080
  define: __FPCLASS_POSZERO=0x0040
  define: __FPCLASS_QNAN=0x0002
  define: __FPCLASS_SNAN=0x0001
  define: __FXSR__=1
  define: __GCC_ASM_FLAG_OUTPUTS__=1
  define: __GCC_CONSTRUCTIVE_SIZE=64
  define: __GCC_DESTRUCTIVE_SIZE=64
  define: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1
  define: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1
  define: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1
  define: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1
  define: __INT16_C_SUFFIX__=
  define: __INT16_FMTd__="hd"
  define: __INT16_FMTi__="hi"
  define: __INT16_MAX__=32767
  define: __INT16_TYPE__=short
  define: __INT32_C_SUFFIX__=
  define: __INT32_FMTd__="d"
  define: __INT32_FMTi__="i"
  define: __INT32_MAX__=2147483647
  define: __INT32_TYPE__=int
  define: __INT64_C_SUFFIX__=LL
  define: __INT64_FMTd__="lld"
  define: __INT64_FMTi__="lli"
  define: __INT64_MAX__=9223372036854775807LL
  define: __INT64_TYPE__=long long int
  define: __INT8_C_SUFFIX__=
  define: __INT8_FMTd__="hhd"
  define: __INT8_FMTi__="hhi"
  define: __INT8_MAX__=127
  define: __INT8_TYPE__=signed char
  define: __INTMAX_C_SUFFIX__=LL
  define: __INTMAX_FMTd__="lld"
  define: __INTMAX_FMTi__="lli"
  define: __INTMAX_MAX__=9223372036854775807LL
  define: __INTMAX_TYPE__=long long int
  define: __INTMAX_WIDTH__=64
  define: __INTPTR_FMTd__="lld"
  define: __INTPTR_FMTi__="lli"
  define: __INTPTR_MAX__=9223372036854775807LL
  define: __INTPTR_TYPE__=long long int
  define: __INTPTR_WIDTH__=64
  define: __INT_FAST16_FMTd__="hd"
  define: __INT_FAST16_FMTi__="hi"
  define: __INT_FAST16_MAX__=32767
  define: __INT_FAST16_TYPE__=short
  define: __INT_FAST16_WIDTH__=16
  define: __INT_FAST32_FMTd__="d"
  define: __INT_FAST32_FMTi__="i"
  define: __INT_FAST32_MAX__=2147483647
  define: __INT_FAST32_TYPE__=int
  define: __INT_FAST32_WIDTH__=32
  define: __INT_FAST64_FMTd__="lld"
  define: __INT_FAST64_FMTi__="lli"
  define: __INT_FAST64_MAX__=9223372036854775807LL
  define: __INT_FAST64_TYPE__=long long int
  define: __INT_FAST64_WIDTH__=64
  define: __INT_FAST8_FMTd__="hhd"
  define: __INT_FAST8_FMTi__="hhi"
  define: __INT_FAST8_MAX__=127
  define: __INT_FAST8_TYPE__=signed char
  define: __INT_FAST8_WIDTH__=8
  define: __INT_LEAST16_FMTd__="hd"
  define: __INT_LEAST16_FMTi__="hi"
  define: __INT_LEAST16_MAX__=32767
  define: __INT_LEAST16_TYPE__=short
  define: __INT_LEAST16_WIDTH__=16
  define: __INT_LEAST32_FMTd__="d"
  define: __INT_LEAST32_FMTi__="i"
  define: __INT_LEAST32_MAX__=2147483647
  define: __INT_LEAST32_TYPE__=int
  define: __INT_LEAST32_WIDTH__=32
  define: __INT_LEAST64_FMTd__="lld"
  define: __INT_LEAST64_FMTi__="lli"
  define: __INT_LEAST64_MAX__=9223372036854775807LL
  define: __INT_LEAST64_TYPE__=long long int
  define: __INT_LEAST64_WIDTH__=64
  define: __INT_LEAST8_FMTd__="hhd"
  define: __INT_LEAST8_FMTi__="hhi"
  define: __INT_LEAST8_MAX__=127
  define: __INT_LEAST8_TYPE__=signed char
  define: __INT_LEAST8_WIDTH__=8
  define: __INT_MAX__=2147483647
  define: __INT_WIDTH__=32
  define: __LDBL_DECIMAL_DIG__=17
  define: __LDBL_DENORM_MIN__=4.9406564584124654e-324L
  define: __LDBL_DIG__=15
  define: __LDBL_EPSILON__=2.2204460492503131e-16L
  define: __LDBL_HAS_DENORM__=1
  define: __LDBL_HAS_INFINITY__=1
  define: __LDBL_HAS_QUIET_NAN__=1
  define: __LDBL_MANT_DIG__=53
  define: __LDBL_MAX_10_EXP__=308
  define: __LDBL_MAX_EXP__=1024
  define: __LDBL_MAX__=1.7976931348623157e+308L
  define: __LDBL_MIN_10_EXP__=(-307)
  define: __LDBL_MIN_EXP__=(-1021)
  define: __LDBL_MIN__=2.2250738585072014e-308L
  define: __LDBL_NORM_MAX__=1.7976931348623157e+308L
  define: __LITTLE_ENDIAN__=1
  define: __LLONG_WIDTH__=64
  define: __LONG_LONG_MAX__=9223372036854775807LL
  define: __LONG_MAX__=2147483647L
  define: __LONG_WIDTH__=32
  define: __MEMORY_SCOPE_DEVICE=1
  define: __MEMORY_SCOPE_SINGLE=4
  define: __MEMORY_SCOPE_SYSTEM=0
  define: __MEMORY_SCOPE_WRKGRP=2
  define: __MEMORY_SCOPE_WVFRNT=3
  define: __MMX__=1
  define: __NO_MATH_INLINES=1
  define: __OBJC_BOOL_IS_BOOL=0
  define: __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES=3
  define: __OPENCL_MEMORY_SCOPE_DEVICE=2
  define: __OPENCL_MEMORY_SCOPE_SUB_GROUP=4
  define: __OPENCL_MEMORY_SCOPE_WORK_GROUP=1
  define: __OPENCL_MEMORY_SCOPE_WORK_ITEM=0
  define: __OPTIMIZE__=1
  define: __ORDER_BIG_ENDIAN__=4321
  define: __ORDER_LITTLE_ENDIAN__=1234
  define: __ORDER_PDP_ENDIAN__=3412
  define: __PIC__=2
  define: __POINTER_WIDTH__=64
  define: __PRAGMA_REDEFINE_EXTNAME=1
  define: __PTRDIFF_FMTd__="lld"
  define: __PTRDIFF_FMTi__="lli"
  define: __PTRDIFF_MAX__=9223372036854775807LL
  define: __PTRDIFF_TYPE__=long long int
  define: __PTRDIFF_WIDTH__=64
  define: __REGISTER_PREFIX__=
  define: __SCHAR_MAX__=127
  define: __SEG_FS=1
  define: __SEG_GS=1
  define: __SHRT_MAX__=32767
  define: __SHRT_WIDTH__=16
  define: __SIG_ATOMIC_MAX__=2147483647
  define: __SIG_ATOMIC_WIDTH__=32
  define: __SIZEOF_DOUBLE__=8
  define: __SIZEOF_FLOAT__=4
  define: __SIZEOF_INT128__=16
  define: __SIZEOF_INT__=4
  define: __SIZEOF_LONG_DOUBLE__=8
  define: __SIZEOF_LONG_LONG__=8
  define: __SIZEOF_LONG__=4
  define: __SIZEOF_POINTER__=8
  define: __SIZEOF_PTRDIFF_T__=8
  define: __SIZEOF_SHORT__=2
  define: __SIZEOF_SIZE_T__=8
  define: __SIZEOF_WCHAR_T__=2
  define: __SIZEOF_WINT_T__=2
  define: __SIZE_FMTX__="llX"
  define: __SIZE_FMTo__="llo"
  define: __SIZE_FMTu__="llu"
  define: __SIZE_FMTx__="llx"
  define: __SIZE_MAX__=18446744073709551615ULL
  define: __SIZE_TYPE__=long long unsigned int
  define: __SIZE_WIDTH__=64
  define: __SSE2_MATH__=1
  define: __SSE2__=1
  define: __SSE_MATH__=1
  define: __SSE__=1
  define: __SSP_STRONG__=2
  define: __STDCPP_DEFAULT_NEW_ALIGNMENT__=16ULL
  define: __STDCPP_THREADS__=1
  define: __STDC_EMBED_EMPTY__=2
  define: __STDC_EMBED_FOUND__=1
  define: __STDC_EMBED_NOT_FOUND__=0
  define: __STDC_HOSTED__=1
  define: __STDC_NO_THREADS__=1
  define: __STDC_UTF_16__=1
  define: __STDC_UTF_32__=1
  define: __UINT16_C_SUFFIX__=
  define: __UINT16_FMTX__="hX"
  define: __UINT16_FMTo__="ho"
  define: __UINT16_FMTu__="hu"
  define: __UINT16_FMTx__="hx"
  define: __UINT16_MAX__=65535
  define: __UINT16_TYPE__=unsigned short
  define: __UINT32_C_SUFFIX__=U
  define: __UINT32_FMTX__="X"
  define: __UINT32_FMTo__="o"
  define: __UINT32_FMTu__="u"
  define: __UINT32_FMTx__="x"
  define: __UINT32_MAX__=4294967295U
  define: __UINT32_TYPE__=unsigned int
  define: __UINT64_C_SUFFIX__=ULL
  define: __UINT64_FMTX__="llX"
  define: __UINT64_FMTo__="llo"
  define: __UINT64_FMTu__="llu"
  define: __UINT64_FMTx__="llx"
  define: __UINT64_MAX__=18446744073709551615ULL
  define: __UINT64_TYPE__=long long unsigned int
  define: __UINT8_C_SUFFIX__=
  define: __UINT8_FMTX__="hhX"
  define: __UINT8_FMTo__="hho"
  define: __UINT8_FMTu__="hhu"
  define: __UINT8_FMTx__="hhx"
  define: __UINT8_MAX__=255
  define: __UINT8_TYPE__=unsigned char
  define: __UINTMAX_C_SUFFIX__=ULL
  define: __UINTMAX_FMTX__="llX"
  define: __UINTMAX_FMTo__="llo"
  define: __UINTMAX_FMTu__="llu"
  define: __UINTMAX_FMTx__="llx"
  define: __UINTMAX_MAX__=18446744073709551615ULL
  define: __UINTMAX_TYPE__=long long unsigned int
  define: __UINTMAX_WIDTH__=64
  define: __UINTPTR_FMTX__="llX"
  define: __UINTPTR_FMTo__="llo"
  define: __UINTPTR_FMTu__="llu"
  define: __UINTPTR_FMTx__="llx"
  define: __UINTPTR_MAX__=18446744073709551615ULL
  define: __UINTPTR_TYPE__=long long unsigned int
  define: __UINTPTR_WIDTH__=64
  define: __UINT_FAST16_FMTX__="hX"
  define: __UINT_FAST16_FMTo__="ho"
  define: __UINT_FAST16_FMTu__="hu"
  define: __UINT_FAST16_FMTx__="hx"
  define: __UINT_FAST16_MAX__=65535
  define: __UINT_FAST16_TYPE__=unsigned short
  define: __UINT_FAST32_FMTX__="X"
  define: __UINT_FAST32_FMTo__="o"
  define: __UINT_FAST32_FMTu__="u"
  define: __UINT_FAST32_FMTx__="x"
  define: __UINT_FAST32_MAX__=4294967295U
  define: __UINT_FAST32_TYPE__=unsigned int
  define: __UINT_FAST64_FMTX__="llX"
  define: __UINT_FAST64_FMTo__="llo"
  define: __UINT_FAST64_FMTu__="llu"
  define: __UINT_FAST64_FMTx__="llx"
  define: __UINT_FAST64_MAX__=18446744073709551615ULL
  define: __UINT_FAST64_TYPE__=long long unsigned int
  define: __UINT_FAST8_FMTX__="hhX"
  define: __UINT_FAST8_FMTo__="hho"
  define: __UINT_FAST8_FMTu__="hhu"
  define: __UINT_FAST8_FMTx__="hhx"
  define: __UINT_FAST8_MAX__=255
  define: __UINT_FAST8_TYPE__=unsigned char
  define: __UINT_LEAST16_FMTX__="hX"
  define: __UINT_LEAST16_FMTo__="ho"
  define: __UINT_LEAST16_FMTu__="hu"
  define: __UINT_LEAST16_FMTx__="hx"
  define: __UINT_LEAST16_MAX__=65535
  define: __UINT_LEAST16_TYPE__=unsigned short
  define: __UINT_LEAST32_FMTX__="X"
  define: __UINT_LEAST32_FMTo__="o"
  define: __UINT_LEAST32_FMTu__="u"
  define: __UINT_LEAST32_FMTx__="x"
  define: __UINT_LEAST32_MAX__=4294967295U
  define: __UINT_LEAST32_TYPE__=unsigned int
  define: __UINT_LEAST64_FMTX__="llX"
  define: __UINT_LEAST64_FMTo__="llo"
  define: __UINT_LEAST64_FMTu__="llu"
  define: __UINT_LEAST64_FMTx__="llx"
  define: __UINT_LEAST64_MAX__=18446744073709551615ULL
  define: __UINT_LEAST64_TYPE__=long long unsigned int
  define: __UINT_LEAST8_FMTX__="hhX"
  define: __UINT_LEAST8_FMTo__="hho"
  define: __UINT_LEAST8_FMTu__="hhu"
  define: __UINT_LEAST8_FMTx__="hhx"
  define: __UINT_LEAST8_MAX__=255
  define: __UINT_LEAST8_TYPE__=unsigned char
  define: __USER_LABEL_PREFIX__=
  define: __VERSION__="Clang 19.1.0"
  define: __WCHAR_MAX__=65535
  define: __WCHAR_TYPE__=unsigned short
  define: __WCHAR_UNSIGNED__=1
  define: __WCHAR_WIDTH__=16
  define: __WINT_MAX__=65535
  define: __WINT_TYPE__=unsigned short
  define: __WINT_UNSIGNED__=1
  define: __WINT_WIDTH__=16
  define: __amd64=1
  define: __amd64__=1
  define: __clang__=1
  define: __clang_literal_encoding__="UTF-8"
  define: __clang_major__=19
  define: __clang_minor__=1
  define: __clang_patchlevel__=0
  define: __clang_version__="19.1.0 "
  define: __clang_wide_literal_encoding__="UTF-16"
  define: __code_model_small__=1
  define: __cplusplus=202302L
  define: __k8=1
  define: __k8__=1
  define: __llvm__=1
  define: __pic__=2
  define: __seg_fs=__attribute__((address_space(257)))
  define: __seg_gs=__attribute__((address_space(256)))
  define: __tune_k8__=1
  define: __x86_64=1
  define: __x86_64__=1
  define: WIN32
  define: _WINDOWS
  define: NDEBUG
  other: --clang
  other: --clang_version=190100
  other: --ms_compatibility
  stdver: c++23
  intelliSenseMode: windows-clang-x64
Update IntelliSense time (sec): 0.165
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 227)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 227)
LSP: Sending response (id: 227)
LSP: (received) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 228)
LSP: (invoked) cpptools/getFoldingRanges: file:///c%3A/Users/User/Desktop/X/main.cpp (id: 228)
LSP: Sending response (id: 228)

Other Extensions

Even leaving only CMake Tools and C/C++ enabled, the issue persists.

Additional context

No response

@bobbrow
Copy link
Member

bobbrow commented Feb 21, 2025

Hi @AlexB8675,

Thanks for reporting this. It appears to be an issue with our compiler's clang mode (MSVC mode is not affected). What's more, the error only appears when including certain std headers. I have forwarded this report this to the team that works on the IntelliSense compiler. (issue: 2396533)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Language Service Visual Studio Inherited from Visual Studio
Projects
Status: No status
Development

No branches or pull requests

2 participants