Repository navigation
Instructions
The extension can be obtained by one of the methods below:
- Install the "C/C++" or "C/C++ Extension Pack" extension published by Microsoft from the Extensions view in VS Code.
- Download a vsix that matches your OS from the Assets section below (and install it via the method mentioned above). The previous download methods have the vsix signatures verified by the Marketplace, but for this method, you can do the verification by downloading the matching manifest and signature.p7s file and running
npx @vscode/vsce@latest verify-signature -i <.vsix> -m <.signature.manifest> -s <.signature.p7s>vscode-vsce#1044.
Requirements
- VS Code 1.77.0 or later (March 2023).
- Windows 10+ (x64, arm64), macOS 10.13+, Linux (Ubuntu 16+, etc.).
- Debugging is not supported on CentOS 7 or RHEL 7. The last supported version was 1.22.11: #13219.
- The last supported version for Windows 7 and 8 was 1.30.5.
Changes
New Features
- Add the opt-in
C_Cpp.hoverShowIntegralValuesInHexadecimalsetting to display integral constants in hexadecimal in IntelliSense hovers. #7281 - Add 'Fold All Inactive Regions' and 'Unfold All Inactive Regions' commands and the opt-in
C_Cpp.autoFoldInactiveRegionssetting. #8992 - Dim unused local variables and parameters when
editor.showUnusedis enabled. #10490 - Dim unreachable code when
editor.showUnusedis enabled. #12902 - Show C++ type size and alignment in hovers, with the
C_Cpp.hoverShowTypeSizeAndAlignmentsetting and 'Toggle Type Size and Alignment in Hovers' command to control them. #13034, #14820 - Add the 'Select a Translation Unit...' command to choose which source file provides IntelliSense context for the active header file. PR #14688
- Add the opt-in
C_Cpp.codeAnalysis.clangTidy.includeCleanerMappingssetting to mapmisc-include-cleanersymbols to public headers. PR #14788 - Dim unused
#includedirectives wheneditor.showUnusedis enabled, respecting per-file Include Cleanup preferences from.editorconfigfiles. PR #14808
Enhancements
- Add support for formatting multiple selections with
clang-formatandvcFormat. #12082 - Improve IntelliSense responsiveness in multi-root workspaces that use independent
compile_commands.jsondatabases. - Increase the per-file IntelliSense diagnostic limit from 250 to 1,000 and prioritize errors over unused-code hints.
- Improve IntelliSense configuration lookup performance for symbolic links to
compile_commands.json. - Reduce language server memory usage in workspaces with many interconnected symbolic links.
- Reduce custom-configuration processing overhead in workspaces with many requested files.
- Improve workspace indexing performance by reducing repeated language-mode processing.
- Improve code folding performance in files with many inactive preprocessor regions.
- Update the bundled
clang-tidyandclang-formatfrom 23.1.0 to 23.1.1. - Reduce CPU usage when resolving headers in large Windows workspaces.
- Improve performance when pruning large IntelliSense caches.
Bug Fixes
- Fix
/Uand-Ucompiler arguments not undefining macros for IntelliSense and code analysis. #13786 - Fix IntelliSense handling of MSVC and clang-cl external include paths and environment variables. #14186, #14205
- Fix missing IntelliSense definitions for additional MSVC predefined macros. #14312
- Fix 'Go to Declaration' and 'Go to Definition' returning the current location instead of an available counterpart. #14509
- Fix lost indentation in displayed documentation comments. #14567
- Fix compiler queries failing to find dependencies installed alongside the compiler on Linux and macOS. #14575
- Fix false IntelliSense errors when initializing a variable with a value from the same unnamed enum. #14726
- Update MIEngine to fix debugger failures with synthetic GDB stack frames. #14741
- Thanks for the contribution. @tzcnt PR MIEngine#1605
- Fix an incorrect
class has more than one default constructorIntelliSense error. #14746 - Fix excessive CPU usage by idle parser workers while workspace parsing is still running. #14757
- Remove the obsolete
C_Cpp.default.recursiveIncludes.reducesetting and its configuration UI control. PR #14761 - Fix incorrect IntelliSense errors for alias-template deduction guides using C++26 pack indexing. #14794
- Fix false IntelliSense errors after rapidly replacing a file with a code snippet. #14807
- Fix false IntelliSense redeclaration errors for class template deduction guides. #14824
- Fix incorrect IntelliSense types after including
stdatomic.hwith MSVC C11 atomics enabled. #14825 - Make parameter-name inlay hint suppression case-insensitive. #14829
- Fix incorrect IntelliSense constructibility results and diagnostics for inherited constructors with unusable base constructors or destructors and abstract classes with virtual bases.
- Fix missing or stale IntelliSense configurations when
compile_commands.jsonfiles are created, changed, or deleted, or when database or source paths use symbolic links. - Fix IntelliSense crashes involving precompiled headers,
constexprevaluation, C++20requiresexpressions, templates, user-defined conversions, and lambdas in macros. - Fix missing related headers in Copilot context when headers are also included through precompiled headers, forced includes, or earlier includes.
- Fix missing IntelliSense headers with Clang
-cxx-isystemand-stdlib++-isystemoptions and split clang-cl-imsvcand/imsvcarguments. - Fix incorrect or missing
#includecompletion suggestions for nonrecursive paths, frameworks, symbolic links, and extensionless files. - Fix missing
cp1125support on all platforms, unsupported file encodings on Linux, and incorrect GB18030 decoding on Linux and macOS. - Fix false IntelliSense errors for nested C++20
requiresexpressions and fold-expression constraints in MSVC module templates. - Fix missing or incorrect recursive header lookup with duplicate include roots, multiple symbolic links, or
..paths. - Fix workspace symbol navigation using resolved paths instead of symlinked workspace paths, and preserve path casing.
- Fix a potential language server deadlock during workspace initialization and a data race in include-path resolution.
- Fix stale 'Create Declaration/Definition' diagnostics after cancellation and reduce redundant diagnostic updates.
- Fix missing IntelliSense errors for duplicate local variables, including redeclarations of function parameters.
- Fix stale IntelliSense diagnostics and inconsistent document snapshots during concurrent edits and requests.
- Fix a language server stack-overflow crash when loading cyclic or excessively deep browse database data.
- Fix
compile_commands.jsonhandling for missing working-directory fields and invalid database roots. - Fix 'Create Declaration/Definition' incorrectly being offered for explicit template instantiations.
- Fix the workspace parsing status briefly reporting completion while a newer parse is still running.
- Fix IntelliSense handling of GCC
--embed-directory=<dir>and--embed-directory <dir>arguments. - Fix Doxygen commands inside literal and diagram blocks being misinterpreted as documentation tags.
- Fix a language server crash when requesting
#includecompletion with certain Unicode prefixes. - Fix incorrect undefined-identifier IntelliSense errors for macros using
__COUNTER__in C++20. - Fix tag parsing of user-defined literal operator suffixes when macro expansion is involved.
- Fix incorrect EUC-JP and GBK source decoding when multibyte characters span read buffers.
- Fix delayed error reporting when a language server worker cannot start on Linux or macOS.
- Fix a language server crash when cleaning up after browse database initialization fails.
- Fix completion for declarations imported from standard-library modules when using MSVC.
- Fix IntelliSense using strict language modes instead of Clang's default GNU dialect.
- Fix header lookup for long Windows paths when Windows long-path support is enabled.
- Fix 'Create Declaration/Definition' matching for functions in the global namespace.
- Fix IntelliSense lookup for scoped enumerations defined inside class templates.
- Fix unwanted completion popups when typing incomplete floating-point exponents.
- Fix inconsistent fuzzy completion matching caused by reused candidate buffers.
- Fix workspace indexing for C11 atomics and other valid C language tokens.
- Fix a Windows tag parser crash when a worker thread cannot be created.
- Fix configuration-provider requests delaying language server shutdown.
- Fix intermittent incorrect compiler architecture detection on Linux.
- Fix a tag parser hang when its symbol database fails to initialize.
- Fix IntelliSense language-standard detection for MSVC
/std:c++23. - Fix a
cpptoolscrash during shutdown on macOS. - Various localization updates.
- Update dependencies.