Repository navigation
Closed
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugverifiedBug has been reproducedBug has been reproduced
Milestone
Description
Environment
- OS and Version: Ubuntu 22.04.3 LTS
- VS Code Version: 1.85.1
- C/C++ Extension Version: 1.19.2
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
constexpr give wrong result.
#include <cstdio>
#include <memory>
int main(int argc, char* argv[]) {
constexpr const size_t t0 = sizeof(std::unique_ptr<int>);
printf("t0: %zu\n", t0);
return 0;
}
IntelliSense show 16, but actually it is 8.

Configuration and Logs
Log:
-------- Diagnostics - 2024/2/3 00:06:58
Version: 1.19.2
Current Configuration:
{
"name": "Linux",
"includePath": [
"/home/llc/下载/my/test0/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64",
"compilerPathInCppPropertiesJson": "/usr/bin/clang",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"compilerPathIsExplicit": false,
"configurationProvider": "ms-vscode.cmake-tools",
"browse": {
"path": [
"/home/llc/下载/my/test0/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"/home/llc/下载/my/3rd/boost_1_84_0",
"/home/llc/下载/my/test0"
],
"compilerPath": "/usr/bin/g++",
"compilerArgs": [],
"compilerFragments": [
"-g -std=gnu++17"
]
}
cpptools version (native): 1.19.2.0
Translation Unit Mappings:
[ /home/llc/下载/my/test0/Main.cpp - source TU]:
Translation Unit Configurations:
[ /home/llc/下载/my/test0/Main.cpp ]:
Process ID: 7035
Memory Usage: 58 MB
Compiler Path: /usr/bin/g++
Includes:
/home/llc/下载/my/3rd/boost_1_84_0
/usr/include/c++/11
/usr/include/x86_64-linux-gnu/c++/11
/usr/include/c++/11/backward
/usr/lib/gcc/x86_64-linux-gnu/11/include
/usr/local/include
/usr/include/x86_64-linux-gnu
/usr/include
Standard Version: c++17
IntelliSense Mode: linux-gcc-x64
Other Flags:
--g++
--gnu_version=110400
Total Memory Usage: 58 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 83034
Number of files parsed: 36252Other Extensions
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Language ServiceVisual StudioInherited from Visual StudioInherited from Visual StudiobugverifiedBug has been reproducedBug has been reproduced
Activity
browntarik commentedon Feb 5, 2024
Thank you for reporting this bug, this seems to be an issue with our IntelliSense support within the extension. Please track this issue for further updates on when a fix is made.
browntarik commentedon Mar 21, 2024
This issue has now been reduced and reported to our internal IntelliSense Team (
2003330). Please track this issue to receive further updates on when it has been addressed.Colengms commentedon Oct 20, 2026
This appears to have since been addressed. I appear to be getting the correct size now (on Linux, with clang).