From 2b1c56294e5ee7877743d7ae6b877e16ebae8b59 Mon Sep 17 00:00:00 2001 From: Glen Chung <105310954+kuchungmsft@users.noreply.github.com> Date: Mon, 5 Oct 2026 10:39:20 -0700 Subject: [PATCH 1/9] Add localizable help for workspace config arguments (#14812) Add localizable mscppls help strings for the workspace-neutral configuration option and its deprecated LSP-named aliases. --- Extension/src/nativeStrings.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index 5ad20f459..df651a089 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -797,5 +797,25 @@ "quick_info_alignment": { "text": "**Alignment:** %s B", "hint": "Alignment of a C or C++ type in bytes. %s is the numeric alignment. Translate B to a count-invariant byte unit symbol or abbreviation. {Locked=\"**\"} {Locked=\"%s\"}" + }, + "help_allow_missing_workspace_config": { + "text": "Allow the server to start even when the specified workspace config file does not exist.", + "hint": "Describes the --allow-missing-workspace-config command-line option." + }, + "help_deprecated_lsp_config": { + "text": "Deprecated alias for --workspace-config.", + "hint": "{Locked=\"--workspace-config\"}" + }, + "help_deprecated_allow_missing_lsp_config": { + "text": "Deprecated alias for --allow-missing-workspace-config.", + "hint": "{Locked=\"--allow-missing-workspace-config\"}" + }, + "error_conflicting_config_args": { + "text": "--workspace-config cannot be combined with --lsp-config.", + "hint": "Error shown when both configuration arguments are supplied. {Locked=\"--workspace-config\"} {Locked=\"--lsp-config\"}" + }, + "error_config_arg_requires_path": { + "text": "{0} requires a path.", + "hint": "Error shown when a configuration argument is not followed by a path. {0} is the command-line option name. {Locked=\"{0}\"}" } } From 8377b1ca7a3c55f4cfd1d139a0a3bd96c7654802 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Mon, 5 Oct 2026 16:04:49 -0700 Subject: [PATCH 2/9] Update dependencies to address security advisories (#14818) --- .github/actions/package-lock.json | 124 ++++++++++-------------------- Extension/yarn.lock | 18 ++--- Themes/package-lock.json | 6 +- 3 files changed, 51 insertions(+), 97 deletions(-) diff --git a/.github/actions/package-lock.json b/.github/actions/package-lock.json index 7d8f2ac9c..edac10ae8 100644 --- a/.github/actions/package-lock.json +++ b/.github/actions/package-lock.json @@ -1130,29 +1130,6 @@ "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha1-v7EGYv7tgZaixi58aOF3IMJ0F5o=", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha1-fHJDiAm1+lur9UGZofHCgaaYT88=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@eslint/config-array/node_modules/minimatch": { "version": "10.2.6", "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/minimatch/-/minimatch-10.2.6.tgz", @@ -2740,29 +2717,6 @@ "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha1-v7EGYv7tgZaixi58aOF3IMJ0F5o=", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha1-fHJDiAm1+lur9UGZofHCgaaYT88=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "10.2.6", "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/minimatch/-/minimatch-10.2.6.tgz", @@ -2993,13 +2947,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.18.1", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/axios/-/axios-1.18.1.tgz", - "integrity": "sha1-1j+YY7zYk4gVyG+eKr04AYnZbf4=", + "version": "1.20.0", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/axios/-/axios-1.20.0.tgz", + "integrity": "sha1-UVUTRFqmDnHQS2UhymIQgpzLR4Y=", "license": "MIT", "dependencies": { "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", + "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } @@ -3100,6 +3054,29 @@ "license": "MIT", "optional": true }, + "node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/brace-expansion/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha1-v7EGYv7tgZaixi58aOF3IMJ0F5o=", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/braces/-/braces-3.0.3.tgz", @@ -3584,29 +3561,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha1-v7EGYv7tgZaixi58aOF3IMJ0F5o=", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha1-fHJDiAm1+lur9UGZofHCgaaYT88=", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/eslint/node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -4070,9 +4024,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.1.4", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.4.tgz", - "integrity": "sha1-WJ2rEcABjQNmvmTNi/Esjb7MgyY=", + "version": "2.1.7", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "dev": true, "license": "MIT", "dependencies": { @@ -4287,9 +4241,9 @@ "license": "ISC" }, "node_modules/ip-address": { - "version": "10.3.1", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/ip-address/-/ip-address-10.3.1.tgz", - "integrity": "sha1-kp+WKdFyT34bdIXOiXUvNnUzahA=", + "version": "10.7.2", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/ip-address/-/ip-address-10.7.2.tgz", + "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==", "dev": true, "license": "MIT", "engines": { @@ -4596,9 +4550,9 @@ } }, "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.1.4", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.4.tgz", - "integrity": "sha1-WJ2rEcABjQNmvmTNi/Esjb7MgyY=", + "version": "2.1.7", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "dev": true, "license": "MIT", "dependencies": { @@ -5380,9 +5334,9 @@ } }, "node_modules/undici": { - "version": "6.28.0", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/undici/-/undici-6.28.0.tgz", - "integrity": "sha1-nw44V0T+9QIdZZbFvM14P2EZPBw=", + "version": "6.29.0", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/undici/-/undici-6.29.0.tgz", + "integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==", "license": "MIT", "engines": { "node": ">=18.17" diff --git a/Extension/yarn.lock b/Extension/yarn.lock index 6baca69d1..a946189da 100644 --- a/Extension/yarn.lock +++ b/Extension/yarn.lock @@ -1709,24 +1709,24 @@ boundary@^2.0.0: integrity "sha1-FpyLHw1Ezywlk4lnoyjzfgpOXvw= sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==" brace-expansion@^1.1.7: - version "1.1.18" - resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-1.1.18.tgz#3ce74d89885136be1535341f8c3d4425c29a5cab" - integrity "sha1-POdNiYhRNr4VNTQfjD1EJcKaXKs= sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==" + version "1.1.21" + resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-1.1.21.tgz#edf4fab5c64d051aea5a8def49aba1c7522279f3" + integrity sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: - version "2.1.4" - resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.4.tgz#589dab11c0018d0366be64cd8bf12c8dbecc8326" - integrity "sha1-WJ2rEcABjQNmvmTNi/Esjb7MgyY= sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==" + version "2.1.7" + resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-2.1.7.tgz#14ea3836731823bb24740225ea43b941b436f9d1" + integrity sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g== dependencies: balanced-match "^1.0.0" brace-expansion@^5.0.2, brace-expansion@^5.0.8: - version "5.0.9" - resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.9.tgz#7c72438809b5fa5babf54199a1f1c281a6984fcf" - integrity "sha1-fHJDiAm1+lur9UGZofHCgaaYT88= sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==" + version "5.0.12" + resolved "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.12.tgz#995fbb4750a77c4d16a7dc942ff2ca6ef8e675ec" + integrity sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ== dependencies: balanced-match "^4.0.2" diff --git a/Themes/package-lock.json b/Themes/package-lock.json index 93e9b3ec9..603165d97 100644 --- a/Themes/package-lock.json +++ b/Themes/package-lock.json @@ -767,9 +767,9 @@ "license": "BSD-2-Clause" }, "node_modules/brace-expansion": { - "version": "5.0.9", - "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.9.tgz", - "integrity": "sha1-fHJDiAm1+lur9UGZofHCgaaYT88=", + "version": "5.0.12", + "resolved": "https://pkgs.dev.azure.com/azure-public/VisualCpp/_packaging/cpp_PublicPackages/npm/registry/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { From 2498b3958dd3602c7be039fcbe07bc00ef9196b0 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Tue, 6 Oct 2026 17:33:56 -0700 Subject: [PATCH 3/9] Show integral values in hexadecimal on hover (#14803) --- Extension/package.json | 6 +++ Extension/package.nls.json | 6 +++ Extension/src/LanguageServer/client.ts | 1 + Extension/src/LanguageServer/settings.ts | 2 + .../tests/quickInfo.test.ts | 51 +++++++++++++++++++ 5 files changed, 66 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index 60f53f7f0..c122428c3 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1055,6 +1055,12 @@ "description": "%c_cpp.configuration.hover.description%", "scope": "resource" }, + "C_Cpp.hoverShowIntegralValuesInHexadecimal": { + "type": "boolean", + "default": false, + "markdownDescription": "%c_cpp.configuration.hoverShowIntegralValuesInHexadecimal.markdownDescription%", + "scope": "resource" + }, "C_Cpp.errorSquiggles": { "type": "string", "enum": [ diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 57f924d7e..eaec6d5d2 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -773,6 +773,12 @@ "c_cpp.configuration.markdownInComments.enabled.description": "Enable all markdown features in the hover tooltip.", "c_cpp.configuration.markdownInComments.disabled.description": "Disable all markdown features in the hover tooltip.", "c_cpp.configuration.hover.description": "If disabled, hover details are no longer provided by the language server.", + "c_cpp.configuration.hoverShowIntegralValuesInHexadecimal.markdownDescription": { + "message": "Displays integral constant values in hexadecimal in IntelliSense hovers. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `default`.", + "comment": [ + "Markdown text between `` should not be translated or localized (it represents literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcpkg.enabled.markdownDescription": { "message": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).", "comment": [ diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 22ccc7d96..7900c67a5 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1502,6 +1502,7 @@ export class DefaultClient implements Client { clangTidyChecksDisabled: settings.clangTidyChecksDisabled, markdownInComments: settings.markdownInComments, hover: settings.hover, + hoverShowIntegralValuesInHexadecimal: settings.hoverShowIntegralValuesInHexadecimal, vcFormatIndentBraces: settings.vcFormatIndentBraces, vcFormatIndentMultiLineRelativeTo: settings.vcFormatIndentMultiLineRelativeTo, vcFormatIndentWithinParentheses: settings.vcFormatIndentWithinParentheses, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 2a394cd62..726ec82cf 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -70,6 +70,7 @@ export interface WorkspaceFolderSettingsParams { clangTidyChecksEnabled: string[] | undefined; clangTidyChecksDisabled: string[] | undefined; hover: string; + hoverShowIntegralValuesInHexadecimal: boolean; markdownInComments: string; vcFormatIndentBraces: boolean; vcFormatIndentMultiLineRelativeTo: string; @@ -478,6 +479,7 @@ export class CppSettings extends Settings { public get isCaseSensitiveFileSupportEnabled(): boolean { return !isWindows || this.getAsString("caseSensitiveFileSupport").toLowerCase() === "enabled"; } public get doxygenSectionTags(): string[] { return this.getAsArrayOfStrings("doxygen.sectionTags"); } public get hover(): string { return this.getAsString("hover"); } + public get hoverShowIntegralValuesInHexadecimal(): boolean { return this.getAsBoolean("hoverShowIntegralValuesInHexadecimal"); } public get markdownInComments(): string { return this.getAsString("markdownInComments"); } public get legacyCompilerArgsBehavior(): boolean { return this.getAsBoolean("legacyCompilerArgsBehavior"); } public get inlayHintsAutoDeclarationTypes(): boolean { return this.getAsBoolean("inlayHints.autoDeclarationTypes.enabled"); } diff --git a/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts b/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts index d9c819386..11a455cba 100644 --- a/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts +++ b/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts @@ -7,6 +7,7 @@ import * as os from 'os'; import * as vscode from 'vscode'; import * as api from 'vscode-cpptools'; import * as apit from 'vscode-cpptools/out/testApi'; +import { CppSettings } from '../../../../src/LanguageServer/settings'; import { timeout } from '../../../../src/Utility/Async/timeout'; import * as testHelpers from '../../../common/testHelpers'; @@ -104,4 +105,54 @@ suite("[Quick info test]", function(): void { const actual: string = (result[0].contents[0]).value; assert.strictEqual(actual, expected); }); + + test("[Hover settings coexist in the same scope]", async () => { + const configuration: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", fileUri); + const originalHover: string | undefined = configuration.inspect("hover")?.workspaceFolderValue; + const originalShowIntegralValuesInHexadecimal: boolean | undefined = + configuration.inspect("hoverShowIntegralValuesInHexadecimal")?.workspaceFolderValue; + + try { + await configuration.update("hover", "disabled", vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hoverShowIntegralValuesInHexadecimal", true, vscode.ConfigurationTarget.WorkspaceFolder); + + const settings: CppSettings = new CppSettings(fileUri); + assert.strictEqual(settings.hover, "disabled"); + assert.strictEqual(settings.hoverShowIntegralValuesInHexadecimal, true); + } finally { + await configuration.update( + "hoverShowIntegralValuesInHexadecimal", + originalShowIntegralValuesInHexadecimal, + vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hover", originalHover, vscode.ConfigurationTarget.WorkspaceFolder); + } + }); + + test("[Folder hexadecimal setting preserves global disabled hover]", async () => { + const configuration: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", fileUri); + const originalGlobalHover: string | undefined = configuration.inspect("hover")?.globalValue; + const originalWorkspaceHover: string | undefined = configuration.inspect("hover")?.workspaceValue; + const originalWorkspaceFolderHover: string | undefined = configuration.inspect("hover")?.workspaceFolderValue; + const originalShowIntegralValuesInHexadecimal: boolean | undefined = + configuration.inspect("hoverShowIntegralValuesInHexadecimal")?.workspaceFolderValue; + + try { + await configuration.update("hover", "disabled", vscode.ConfigurationTarget.Global); + await configuration.update("hover", undefined, vscode.ConfigurationTarget.Workspace); + await configuration.update("hover", undefined, vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hoverShowIntegralValuesInHexadecimal", true, vscode.ConfigurationTarget.WorkspaceFolder); + + const settings: CppSettings = new CppSettings(fileUri); + assert.strictEqual(settings.hover, "disabled"); + assert.strictEqual(settings.hoverShowIntegralValuesInHexadecimal, true); + } finally { + await configuration.update( + "hoverShowIntegralValuesInHexadecimal", + originalShowIntegralValuesInHexadecimal, + vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hover", originalWorkspaceFolderHover, vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hover", originalWorkspaceHover, vscode.ConfigurationTarget.Workspace); + await configuration.update("hover", originalGlobalHover, vscode.ConfigurationTarget.Global); + } + }); }); From fbdb130688afbfab1dc902ee44823a1e6c8476ee Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Tue, 6 Oct 2026 18:58:53 -0700 Subject: [PATCH 4/9] Send include cleanup editorconfig preferences (#14808) --- Extension/src/LanguageServer/client.ts | 26 ++++++---- .../includeCleanupEditorConfig.ts | 33 ++++++++++++ .../unit/includeCleanupEditorConfig.test.ts | 51 +++++++++++++++++++ 3 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 Extension/src/LanguageServer/includeCleanupEditorConfig.ts create mode 100644 Extension/test/unit/includeCleanupEditorConfig.test.ts diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 7900c67a5..25343f4f7 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -55,6 +55,7 @@ import { CustomConfigurationProvider1, getCustomConfigProviders, isSameProviderE import { DataBinding } from './dataBinding'; import { cachedEditorConfigSettings, getEditorConfigSettings } from './editorConfig'; import { CppSourceStr, clients, configPrefix, initializeIntervalTimer, isWritingCrashCallStack, updateLanguageConfigurations, usesCrashHandler, watchForCrashes } from './extension'; +import { IncludeCleanupPreferences, getIncludeCleanupPreferences } from './includeCleanupEditorConfig'; import { InactiveRegion, InactiveRegionStore, getInactiveRegionStartLines } from './inactiveRegions'; import { LanguageClient } from './languageClient'; import { LocalizeStringParams, getLocaleId, getLocalizedString } from './localization'; @@ -507,6 +508,7 @@ interface TagParseStatus { interface VisibleEditorInfo { visibleRanges: Range[]; originalEncoding: string; + includeCleanupPreferences: IncludeCleanupPreferences; } interface DidChangeVisibleTextEditorsParams { @@ -1953,9 +1955,11 @@ export class DefaultClient implements Client { // First, we just concat all ranges for the same file. const uri: string = editor.document.uri.toString(); if (!visibileEditorInfo[uri]) { + const editorConfigSettings: any = getEditorConfigSettings(editor.document.uri.fsPath); visibileEditorInfo[uri] = { visibleRanges: [], - originalEncoding: editor.document.encoding + originalEncoding: editor.document.encoding, + includeCleanupPreferences: getIncludeCleanupPreferences(editorConfigSettings) }; } visibileEditorInfo[uri].visibleRanges = visibileEditorInfo[uri].visibleRanges.concat(editor.visibleRanges.map(makeLspRange)); @@ -2714,6 +2718,15 @@ export class DefaultClient implements Client { private associations_for_did_change?: Set; + private refreshEditorConfigSettings(): void { + cachedEditorConfigSettings.clear(); + cachedEditorConfigLookups.clear(); + this.updateActiveDocumentTextOptions(); + + const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(editor => util.isCpp(editor.document)); + void this.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined); + } + /** * listen for file created/deleted events under the ${workspaceFolder} folder */ @@ -2734,9 +2747,7 @@ export class DefaultClient implements Client { } const fileName: string = path.basename(uri.fsPath).toLowerCase(); if (fileName === ".editorconfig") { - cachedEditorConfigSettings.clear(); - cachedEditorConfigLookups.clear(); - this.updateActiveDocumentTextOptions(); + this.refreshEditorConfigSettings(); } if (fileName === ".clang-format" || fileName === "_clang-format") { cachedEditorConfigLookups.clear(); @@ -2762,9 +2773,7 @@ export class DefaultClient implements Client { const dotIndex: number = uri.fsPath.lastIndexOf('.'); const fileName: string = path.basename(uri.fsPath).toLowerCase(); if (fileName === ".editorconfig") { - cachedEditorConfigSettings.clear(); - cachedEditorConfigLookups.clear(); - this.updateActiveDocumentTextOptions(); + this.refreshEditorConfigSettings(); } const ext: string | undefined = dotIndex !== -1 ? uri.fsPath.substring(dotIndex + 1) : undefined; const isTrackedFile: boolean = hasNativeFileTypeMappings() @@ -2789,8 +2798,7 @@ export class DefaultClient implements Client { } const fileName: string = path.basename(uri.fsPath).toLowerCase(); if (fileName === ".editorconfig") { - cachedEditorConfigSettings.clear(); - cachedEditorConfigLookups.clear(); + this.refreshEditorConfigSettings(); } if (fileName === ".clang-format" || fileName === "_clang-format") { cachedEditorConfigLookups.clear(); diff --git a/Extension/src/LanguageServer/includeCleanupEditorConfig.ts b/Extension/src/LanguageServer/includeCleanupEditorConfig.ts new file mode 100644 index 000000000..60c7fb17c --- /dev/null +++ b/Extension/src/LanguageServer/includeCleanupEditorConfig.ts @@ -0,0 +1,33 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +export interface IncludeCleanupPreferences { + alternateFiles: string; + excludedFiles: string; + replacementFiles: string; + requiredFiles: string; +} + +function normalizeSettingKeys(settings: any): Record { + return Object.fromEntries(Object.entries(settings ?? {}).map(([key, value]) => [key.toLowerCase(), value])); +} + +function getStringSetting(settings: Record, key: string): string { + const value: unknown = settings?.[key]; + if (typeof value !== 'string' || value.toLowerCase() === 'unset') { + return ''; + } + return value; +} + +export function getIncludeCleanupPreferences(settings: any): IncludeCleanupPreferences { + const normalizedSettings: Record = normalizeSettingKeys(settings); + return { + alternateFiles: getStringSetting(normalizedSettings, 'cpp_include_cleanup_alternate_files'), + excludedFiles: getStringSetting(normalizedSettings, 'cpp_include_cleanup_excluded_files'), + replacementFiles: getStringSetting(normalizedSettings, 'cpp_include_cleanup_replacement_files'), + requiredFiles: getStringSetting(normalizedSettings, 'cpp_include_cleanup_required_files') + }; +} diff --git a/Extension/test/unit/includeCleanupEditorConfig.test.ts b/Extension/test/unit/includeCleanupEditorConfig.test.ts new file mode 100644 index 000000000..cf9ccdf74 --- /dev/null +++ b/Extension/test/unit/includeCleanupEditorConfig.test.ts @@ -0,0 +1,51 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { deepStrictEqual } from 'assert'; +import { describe, it } from 'mocha'; +import { getIncludeCleanupPreferences } from '../../src/LanguageServer/includeCleanupEditorConfig'; + +describe('Include Cleanup editorconfig settings', () => { + it('maps semantic preference strings', () => { + deepStrictEqual(getIncludeCleanupPreferences({ + cpp_include_cleanup_alternate_files: 'umbrella.h:internal.h', + cpp_include_cleanup_excluded_files: 'generated.h', + cpp_include_cleanup_replacement_files: 'stdio.h:cstdio', + cpp_include_cleanup_required_files: 'atlwin.h:atlbase.h' + }), { + alternateFiles: 'umbrella.h:internal.h', + excludedFiles: 'generated.h', + replacementFiles: 'stdio.h:cstdio', + requiredFiles: 'atlwin.h:atlbase.h' + }); + }); + + it('maps property names case-insensitively', () => { + deepStrictEqual(getIncludeCleanupPreferences({ + CPP_INCLUDE_CLEANUP_ALTERNATE_FILES: 'umbrella.h:internal.h', + Cpp_Include_Cleanup_Excluded_Files: 'generated.h', + cpp_INCLUDE_cleanup_REPLACEMENT_files: 'stdio.h:cstdio', + CPP_include_cleanup_required_FILES: 'atlwin.h:atlbase.h' + }), { + alternateFiles: 'umbrella.h:internal.h', + excludedFiles: 'generated.h', + replacementFiles: 'stdio.h:cstdio', + requiredFiles: 'atlwin.h:atlbase.h' + }); + }); + + it('maps unset and non-string values to empty strings', () => { + deepStrictEqual(getIncludeCleanupPreferences({ + cpp_include_cleanup_alternate_files: 'unset', + cpp_include_cleanup_excluded_files: true, + cpp_include_cleanup_replacement_files: 42 + }), { + alternateFiles: '', + excludedFiles: '', + replacementFiles: '', + requiredFiles: '' + }); + }); +}); From 9a30994a45acd9b9dcc2363ebd430ca2ec73830a Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 8 Oct 2026 10:50:50 -0700 Subject: [PATCH 5/9] Add configurable clang-tidy Include Cleaner provider mappings (#14788) --- Extension/package.json | 14 ++ Extension/package.nls.json | 6 + Extension/src/LanguageServer/client.ts | 1 + Extension/src/LanguageServer/settings.ts | 10 + .../src/LanguageServer/settingsTracker.ts | 1 + Extension/test/unit/settings.test.ts | 189 ++++++++++++++++++ 6 files changed, 221 insertions(+) create mode 100644 Extension/test/unit/settings.test.ts diff --git a/Extension/package.json b/Extension/package.json index c122428c3..6c4efb682 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2287,6 +2287,20 @@ "markdownDescription": "%c_cpp.configuration.codeAnalysis.clangTidy.headerFilter.markdownDescription%", "scope": "resource" }, + "C_Cpp.codeAnalysis.clangTidy.includeCleanerMappings": { + "type": "object", + "default": {}, + "propertyNames": { + "minLength": 1, + "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+(?![\\s\\S])" + }, + "additionalProperties": { + "type": "string", + "pattern": "^(?:<[^<>\"\\u0000-\\u001f\\u007f-\\u009f]+>|\"[^<>\"\\u0000-\\u001f\\u007f-\\u009f]+\")(?![\\s\\S])" + }, + "markdownDescription": "%c_cpp.configuration.codeAnalysis.clangTidy.includeCleanerMappings.markdownDescription%", + "scope": "resource" + }, "C_Cpp.codeAnalysis.clangTidy.args": { "type": "array", "items": { diff --git a/Extension/package.nls.json b/Extension/package.nls.json index eaec6d5d2..2d0019cf0 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -201,6 +201,12 @@ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.codeAnalysis.clangTidy.includeCleanerMappings.markdownDescription": { + "message": "Opt-in mappings from exact `misc-include-cleaner` symbol names to public headers. Keys must be nonempty. Values use `` or `\"path\"` with a nonempty path and no embedded delimiters. Keys and values cannot contain control characters. Diagnostics are kept unless a direct include of the mapped header is proven; public-header insertion is offered when available.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.codeAnalysis.clangTidy.args.markdownDescription": { "message": "Additional command line arguments to pass to `clang-tidy`. These take precedence over the equivalent `C_Cpp.codeAnalysis.clangTidy.*` settings.", "comment": [ diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 25343f4f7..176b3a40b 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1498,6 +1498,7 @@ export class DefaultClient implements Client { clangTidyConfig: settings.clangTidyConfig, clangTidyFallbackConfig: settings.clangTidyFallbackConfig, clangTidyHeaderFilter: settings.clangTidyHeaderFilter !== null ? util.resolveVariables(settings.clangTidyHeaderFilter, this.AdditionalEnvironment) : null, + clangTidyIncludeCleanerMappings: settings.clangTidyIncludeCleanerMappings, clangTidyArgs: util.resolveVariablesArray(settings.clangTidyArgs, this.AdditionalEnvironment), clangTidyUseBuildPath: settings.clangTidyUseBuildPath, clangTidyChecksEnabled: settings.clangTidyChecksEnabled, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 726ec82cf..0214c5e4a 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -65,6 +65,7 @@ export interface WorkspaceFolderSettingsParams { clangTidyConfig: string | undefined; clangTidyFallbackConfig: string | undefined; clangTidyHeaderFilter: string | null; + clangTidyIncludeCleanerMappings: Associations; clangTidyArgs: string[]; clangTidyUseBuildPath: boolean; clangTidyChecksEnabled: string[] | undefined; @@ -349,6 +350,15 @@ export class CppSettings extends Settings { public get clangTidyConfig(): string | undefined { return changeBlankStringToUndefined(this.getAsStringOrUndefined("codeAnalysis.clangTidy.config")); } public get clangTidyFallbackConfig(): string | undefined { return changeBlankStringToUndefined(this.getAsStringOrUndefined("codeAnalysis.clangTidy.fallbackConfig")); } public get clangTidyHeaderFilter(): string | null { return this.getAsString("codeAnalysis.clangTidy.headerFilter", true); } + public get clangTidyIncludeCleanerMappings(): Associations { + const mappings: Associations = this.getAsAssociations("codeAnalysis.clangTidy.includeCleanerMappings"); + return Object.fromEntries(Object.entries(mappings).filter(([symbol, header]) => + symbol.length > 0 + && !/[\u0000-\u001f\u007f-\u009f]/.test(symbol) + && header.length > 2 + && ((header.startsWith("<") && header.endsWith(">")) || (header.startsWith('"') && header.endsWith('"'))) + && !/[<>"\u0000-\u001f\u007f-\u009f]/.test(header.slice(1, -1)))); + } public get clangTidyArgs(): string[] | undefined { return this.getAsArrayOfStringsOrUndefined("codeAnalysis.clangTidy.args"); } public get clangTidyUseBuildPath(): boolean { return this.getAsBoolean("codeAnalysis.clangTidy.useBuildPath"); } public get clangTidyChecksEnabled(): string[] | undefined { return this.getAsArrayOfStringsOrUndefined("codeAnalysis.clangTidy.checks.enabled", true); } diff --git a/Extension/src/LanguageServer/settingsTracker.ts b/Extension/src/LanguageServer/settingsTracker.ts index 6cc37f45b..0ebbe5bc7 100644 --- a/Extension/src/LanguageServer/settingsTracker.ts +++ b/Extension/src/LanguageServer/settingsTracker.ts @@ -198,6 +198,7 @@ export class SettingsTracker { || key === "codeAnalysis.clangTidy.path" || key === "codeAnalysis.clangTidy.headerFilter" || key === "codeAnalysis.clangTidy.args" || key === "codeAnalysis.clangTidy.config" || key === "codeAnalysis.clangTidy.fallbackConfig" + || key === "codeAnalysis.clangTidy.includeCleanerMappings" // Note: An existing bug prevents these settings of type "object" from getting processed here, // so these checks are here just in case that bug gets fixed later on. diff --git a/Extension/test/unit/settings.test.ts b/Extension/test/unit/settings.test.ts new file mode 100644 index 000000000..edb96479a --- /dev/null +++ b/Extension/test/unit/settings.test.ts @@ -0,0 +1,189 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All Rights Reserved. + * See 'LICENSE' in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { beforeEach, describe, it } from 'mocha'; +import { deepStrictEqual, strictEqual } from 'node:assert'; +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import type { Uri } from 'vscode'; +import proxyquire = require('proxyquire'); + +const settingName = 'codeAnalysis.clangTidy.includeCleanerMappings'; +const packageJson = JSON.parse(readFileSync(resolve(__dirname, '../../../package.json'), 'utf8')); +let mappings: unknown; +let requestedResource: unknown; + +function getSetting(key: string, value: unknown): unknown { + const settings = { codeAnalysis: { clangTidy: { includeCleanerMappings: value } } }; + return key.split('.').reduce((section, name) => + section && typeof section === 'object' ? (section as Record)[name] : undefined, settings); +} + +const configuration = { + codeAnalysis: {}, + get: (key: string) => getSetting(key, mappings), + inspect: (key: string) => ({ defaultValue: getSetting(key, {}) }) +}; +const vscode = { + extensions: { getExtension: () => ({ packageJSON: packageJson }) }, + workspace: { + getConfiguration: (_section: string, resource: unknown) => { + requestedResource = resource; + return configuration; + } + } +}; +const load = proxyquire.noCallThru(); +const common: typeof import('../../src/common') = load('../../src/common', { + vscode, + 'vscode-languageclient': {}, + 'vscode-tas-client': {}, + './logger': {}, + './platform': {}, + './telemetry': {} +}); +const { CppSettings }: typeof import('../../src/LanguageServer/settings') = load('../../src/LanguageServer/settings', { + vscode, + '../common': common, + '../telemetry': {}, + './client': {}, + './editorConfig': {}, + './extension': {}, + './persistentState': {} +}); +const { SettingsTracker }: typeof import('../../src/LanguageServer/settingsTracker') = load('../../src/LanguageServer/settingsTracker', { + vscode, + '../common': common +}); +const schema = common.getRawSetting(`C_Cpp.${settingName}`, true); + +const controlCharacters = [ + ...Array.from({ length: 0x20 }, (_, code) => String.fromCharCode(code)), + ...Array.from({ length: 0x21 }, (_, code) => String.fromCharCode(0x7f + code)) +]; +const validHeaders = [ + '', + '"widget.h"', + '', + '"folder with spaces/widget.h"', + '', + '"folder\\widget.h"', + '<${name}.h>', + '', + '"cafe\u0301/élément.h"' +]; +const invalidHeaders = [ + '', '<>', '""', 'widget.h', '#include ', + '', ' trailing', ' ', + '\n', '\r', '\n', '', '"widget\r.h"', + '', '"widget\0.h"', '', '"widgeth"', + '', 'h>', '"widget"h"', '\n#include "other.h"', + '""', '<"widget.h">', + ...controlCharacters.flatMap(control => [ + ``, `"widget${control}.h"`, + `${control}`, `${control}"widget.h"`, + `${control}`, `"widget.h"${control}` + ]) +]; + +describe('Include Cleaner mapping settings', () => { + beforeEach(() => { + mappings = undefined; + requestedResource = undefined; + }); + + it('declares a localized resource-scoped object with an empty default', () => { + strictEqual(schema.type, 'object'); + strictEqual(schema.scope, 'resource'); + deepStrictEqual(schema.default, {}); + strictEqual(schema.propertyNames.minLength, 1); + strictEqual(schema.additionalProperties.type, 'string'); + const messages = JSON.parse(readFileSync(resolve(__dirname, '../../../package.nls.json'), 'utf8')); + strictEqual(typeof messages[schema.markdownDescription.slice(1, -1)].message, 'string'); + deepStrictEqual(new CppSettings().clangTidyIncludeCleanerMappings, {}); + }); + + it('preserves exact symbol names and literal include spellings for the resource', () => { + const resource = { scheme: 'file', fsPath: '/workspace' } as Uri; + const expected = Object.freeze(Object.fromEntries([ + ['example::widget', ''], + ['example::Widget', '"widget.h"'], + ['example::operator*', ''], + ['example::operator<', ''], + ['example::operator>', '"operators.h"'], + ['example::operator""_tag', ''], + ['example::.*', ''], + ['café::élément', ''], + ['cafe\u0301::élément', '"cafe\u0301/élément.h"'], + ['__proto__', ''] + ])); + mappings = expected; + const actual = new CppSettings(resource).clangTidyIncludeCleanerMappings; + deepStrictEqual(actual, expected); + strictEqual(Object.getPrototypeOf(actual), Object.prototype); + strictEqual(Object.getOwnPropertyDescriptor(actual, '__proto__')?.value, ''); + strictEqual(requestedResource, resource); + const pattern = new RegExp(schema.propertyNames.pattern); + for (const symbol of Object.keys(expected)) { + strictEqual(pattern.test(symbol), true, JSON.stringify(symbol)); + } + }); + + it('drops empty or control-containing symbol names without dropping valid entries', () => { + const invalidSymbols = ['', ...controlCharacters.flatMap(control => [ + control, `${control}example::widget`, `example::${control}widget`, `example::widget${control}` + ])]; + for (const symbol of invalidSymbols) { + mappings = Object.freeze({ [symbol]: '', 'example::other': '' }); + deepStrictEqual(new CppSettings().clangTidyIncludeCleanerMappings, { 'example::other': '' }, JSON.stringify(symbol)); + strictEqual(new RegExp(schema.propertyNames.pattern).test(symbol), false, JSON.stringify(symbol)); + } + }); + + it('agrees with the schema on valid literal headers', () => { + const pattern = new RegExp(schema.additionalProperties.pattern); + for (const header of validHeaders) { + mappings = { 'example::widget': header }; + deepStrictEqual(new CppSettings().clangTidyIncludeCleanerMappings, mappings, JSON.stringify(header)); + strictEqual(pattern.test(header), true, JSON.stringify(header)); + } + }); + + it('drops malformed headers without dropping valid string entries', () => { + const pattern = new RegExp(schema.additionalProperties.pattern); + for (const header of invalidHeaders) { + mappings = Object.freeze({ 'example::widget': header, 'example::other': '' }); + deepStrictEqual(new CppSettings().clangTidyIncludeCleanerMappings, { 'example::other': '' }, JSON.stringify(header)); + strictEqual(pattern.test(header), false, JSON.stringify(header)); + } + }); + + it('uses the empty default for values that are not string-to-string objects', () => { + for (const value of [null, false, 42, '', [], [''], { 'example::widget': null }, + { 'example::widget': [''] }, { 'example::widget': 42, 'example::other': '' }]) { + mappings = value; + deepStrictEqual(new CppSettings().clangTidyIncludeCleanerMappings, {}, JSON.stringify(value)); + } + }); + + it('redacts mapping keys and values from initial and changed-settings telemetry', () => { + mappings = { 'private::widget': '', toString: '"private-string.h"' }; + const tracker = new SettingsTracker(undefined); + deepStrictEqual(tracker.getUserModifiedSettings(), { [settingName]: '...' }); + deepStrictEqual(tracker.getChangedSettings(), {}); + mappings = { 'private::other': '"private-other.h"' }; + deepStrictEqual(tracker.getChangedSettings(), { [settingName]: '...' }); + mappings = {}; + deepStrictEqual(tracker.getChangedSettings(), { [settingName]: '' }); + }); + + it('redacts malformed mapping entries without recursing into their keys', () => { + for (const value of [{ 'private::widget': { 'private-key': 'private-value' } }, ['private-value']]) { + mappings = value; + const tracker = new SettingsTracker(undefined); + deepStrictEqual(tracker.getUserModifiedSettings(), { [settingName]: '...' }); + } + }); +}); From dcb7034453689b8ad3e7b90738cc7cfe942f0562 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 9 Oct 2026 04:40:41 -0700 Subject: [PATCH 6/9] Make multi-root inactive folding routing test deterministic (#14823) --- .../tests/inactiveFolding.test.ts | 95 ++++--------------- 1 file changed, 20 insertions(+), 75 deletions(-) diff --git a/Extension/test/scenarios/MultirootDeadlockTest/tests/inactiveFolding.test.ts b/Extension/test/scenarios/MultirootDeadlockTest/tests/inactiveFolding.test.ts index f97597c64..4f544ca10 100644 --- a/Extension/test/scenarios/MultirootDeadlockTest/tests/inactiveFolding.test.ts +++ b/Extension/test/scenarios/MultirootDeadlockTest/tests/inactiveFolding.test.ts @@ -11,75 +11,69 @@ import { suite } from 'mocha'; import * as path from 'path'; import * as sinon from 'sinon'; import * as vscode from 'vscode'; -import * as api from 'vscode-cpptools'; -import * as apit from 'vscode-cpptools/out/testApi'; import * as extension from '../../../../src/LanguageServer/extension'; import * as testHelpers from '../../../common/testHelpers'; suite("Inactive region folding in a multi-root workspace", function (): void { - let testHook: apit.CppToolsTestHook; let firstWorkspaceFolder: vscode.WorkspaceFolder; let workspaceFolder: vscode.WorkspaceFolder; suiteSetup(async function (): Promise { await testHelpers.activateCppExtension(); - const cpptools: apit.CppToolsTestApi = await apit.getCppToolsTestApi(api.Version.latest) - ?? assert.fail("Could not get CppToolsTestApi"); - testHook = cpptools.getTestHook(); firstWorkspaceFolder = vscode.workspace.workspaceFolders?.[0] ?? assert.fail("First workspace folder is unavailable"); workspaceFolder = vscode.workspace.workspaceFolders?.[1] ?? assert.fail("Second workspace folder is unavailable"); }); - suiteTeardown(function (): void { - testHook.dispose(); - }); - test("routes manual folding operations by URI during a workspace client switch", async () => { - const configuration: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", workspaceFolder.uri); - const previousCodeFoldingValue: string | undefined = configuration.inspect("codeFolding")?.globalValue; - await configuration.update("codeFolding", "enabled", vscode.ConfigurationTarget.Global); + const sandbox: sinon.SinonSandbox = sinon.createSandbox(); let releaseEditorChange: (() => void) | undefined; - let editorChangeStub: sinon.SinonStub | undefined; let editorChangePromise: Promise | undefined; let editor: vscode.TextEditor | undefined; let firstEditor: vscode.TextEditor | undefined; try { - editor = await openFileAndWaitForIntelliSense(); - await vscode.commands.executeCommand("editor.unfoldAll"); - const firstDocument: vscode.TextDocument = await vscode.workspace.openTextDocument( path.join(firstWorkspaceFolder.uri.fsPath, "test.cpp")); firstEditor = await vscode.window.showTextDocument(firstDocument); await extension.clients.didChangeActiveEditor(firstEditor); const firstClient = extension.clients.ActiveClient; - const owner = extension.clients.getClientFor(editor.document.uri); + const document: vscode.TextDocument = await vscode.workspace.openTextDocument( + path.join(workspaceFolder.uri.fsPath, "code_folding.cpp")); + const owner = extension.clients.getClientFor(document.uri); assert.notStrictEqual(firstClient, owner); + const ownerFoldStub: sinon.SinonStub = sandbox.stub(owner, "foldAllInactiveRegions").resolves(); + const ownerUnfoldStub: sinon.SinonStub = sandbox.stub(owner, "unfoldAllInactiveRegions").resolves(); + const firstFoldStub: sinon.SinonStub = sandbox.stub(firstClient, "foldAllInactiveRegions").resolves(); + const firstUnfoldStub: sinon.SinonStub = sandbox.stub(firstClient, "unfoldAllInactiveRegions").resolves(); + const pendingEditorChange: Promise = new Promise(resolve => releaseEditorChange = resolve); - editorChangeStub = sinon.stub(owner, "didChangeActiveEditor").returns(pendingEditorChange); - const activeEditor: vscode.TextEditor = await vscode.window.showTextDocument(editor.document, editor.viewColumn, false); - editorChangePromise = extension.clients.didChangeActiveEditor(activeEditor); + // Hold the client switch open; only command dispatch is under test. + sandbox.stub(owner, "didChangeActiveEditor").returns(pendingEditorChange); + editor = await vscode.window.showTextDocument(document); + editorChangePromise = extension.clients.didChangeActiveEditor(editor); assert.strictEqual(extension.clients.ActiveClient, firstClient); await vscode.commands.executeCommand("C_Cpp.FoldAllInactiveRegions"); - await assertInactiveBranchIsFolded(editor); + sinon.assert.calledOnce(ownerFoldStub); + sinon.assert.notCalled(firstFoldStub); + assert.strictEqual(extension.clients.ActiveClient, firstClient); await vscode.commands.executeCommand("C_Cpp.UnfoldAllInactiveRegions"); - await assertInactiveBranchIsUnfolded(editor); + sinon.assert.calledOnce(ownerUnfoldStub); + sinon.assert.notCalled(firstUnfoldStub); + assert.strictEqual(extension.clients.ActiveClient, firstClient); } finally { releaseEditorChange?.(); await editorChangePromise; - editorChangeStub?.restore(); + sandbox.restore(); if (editor) { await closeEditor(editor); } if (firstEditor) { await closeEditor(firstEditor); } - await testHelpers.delay(150); - await configuration.update("codeFolding", previousCodeFoldingValue, vscode.ConfigurationTarget.Global); } }); @@ -87,53 +81,4 @@ suite("Inactive region folding in a multi-root workspace", function (): void { await vscode.window.showTextDocument(editor.document, editor.viewColumn, false); await vscode.commands.executeCommand("workbench.action.closeActiveEditor"); } - - async function assertInactiveBranchIsFolded(editor: vscode.TextEditor): Promise { - let line: number = 24; - for (let i: number = 0; i < 20; ++i) { - const activeEditor: vscode.TextEditor = await vscode.window.showTextDocument(editor.document, editor.viewColumn, false); - activeEditor.selection = new vscode.Selection(24, 0, 24, 0); - await vscode.commands.executeCommand("cursorMove", { to: "down", by: "wrappedLine", value: 1 }); - line = activeEditor.selection.active.line; - if (line === 28) { - return; - } - await testHelpers.delay(50); - } - - assert.strictEqual(line, 28); - } - - async function assertInactiveBranchIsUnfolded(editor: vscode.TextEditor): Promise { - const activeEditor: vscode.TextEditor = await vscode.window.showTextDocument(editor.document, editor.viewColumn, false); - activeEditor.selection = new vscode.Selection(24, 0, 24, 0); - await vscode.commands.executeCommand("cursorMove", { to: "down", by: "wrappedLine", value: 1 }); - assert.strictEqual(activeEditor.selection.active.line, 25); - } - - function waitForIntelliSenseReady(fileName: string): Promise { - return new Promise((resolve, reject) => { - const timeout: NodeJS.Timeout = setTimeout(() => { - listener.dispose(); - reject(new Error(`Timed out waiting for IntelliSense for ${fileName}`)); - }, testHelpers.defaultTimeout); - const listener: vscode.Disposable = testHook.IntelliSenseStatusChanged(result => { - if (result.filename === fileName && result.status === apit.Status.IntelliSenseReady) { - clearTimeout(timeout); - listener.dispose(); - resolve(); - } - }); - }); - } - - async function openFileAndWaitForIntelliSense(): Promise { - const fileName: string = "code_folding.cpp"; - const filePath: string = path.join(workspaceFolder.uri.fsPath, fileName); - const ready: Promise = waitForIntelliSenseReady(fileName); - const document: vscode.TextDocument = await vscode.workspace.openTextDocument(filePath); - const editor: vscode.TextEditor = await vscode.window.showTextDocument(document); - await ready; - return editor; - } }); From d4f62233ad9e47e7a31f5a5a62705b160be4bee4 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Fri, 9 Oct 2026 11:57:00 -0700 Subject: [PATCH 7/9] Refresh localized diagnostic messages with safe English fallbacks (#14826) --- Extension/bin/messages/cs/messages.json | 41 +++++++++++++++------- Extension/bin/messages/de/messages.json | 41 +++++++++++++++------- Extension/bin/messages/es/messages.json | 41 +++++++++++++++------- Extension/bin/messages/fr/messages.json | 41 +++++++++++++++------- Extension/bin/messages/it/messages.json | 41 +++++++++++++++------- Extension/bin/messages/ja/messages.json | 41 +++++++++++++++------- Extension/bin/messages/ko/messages.json | 41 +++++++++++++++------- Extension/bin/messages/pl/messages.json | 41 +++++++++++++++------- Extension/bin/messages/pt-br/messages.json | 41 +++++++++++++++------- Extension/bin/messages/ru/messages.json | 41 +++++++++++++++------- Extension/bin/messages/tr/messages.json | 41 +++++++++++++++------- Extension/bin/messages/zh-cn/messages.json | 41 +++++++++++++++------- Extension/bin/messages/zh-tw/messages.json | 41 +++++++++++++++------- 13 files changed, 364 insertions(+), 169 deletions(-) diff --git a/Extension/bin/messages/cs/messages.json b/Extension/bin/messages/cs/messages.json index b7334c92e..e207091f9 100644 --- a/Extension/bin/messages/cs/messages.json +++ b/Extension/bin/messages/cs/messages.json @@ -2713,11 +2713,11 @@ "Nepovedlo se inicializovat metadata.", "Neplatné přetypování mezi základní a odvozenou třídou (skutečný typ odvozené třídy je %t)", "Neplatný přístup k %n v objektu s úplným typem %t.", - "__auto_type tady není povolený.", - "__auto_type nepovoluje víc deklarátorů.", - "Inicializace pomocí {...} není povolená pro __auto_type.", - "__auto_type musí být zástupný symbol pro úplný typ proměnné (ne pro komponentu tohoto typu).", - "Proměnná deklarovaná pomocí __auto_type musí mít inicializátor.", + "%sq not allowed here", + "%sq does not permit multiple declarators", + "initialization with \"{...}\" is not allowed for %sq", + "%sq musí být zástupný symbol pro úplný typ proměnné (ne pro komponentu tohoto typu).", + "a variable declared with %sq requires an initializer", "Konstanta typu integer musí být větší nebo rovná nule.", "Typ musí být integrální typ.", "Výraz se nedá interpretovat.", @@ -3000,7 +3000,7 @@ "Došlo k neznámé chybě. Soubor PCH IntelliSense se nevygeneroval.", "Nejméně jednu ze vzdálených cest nejde namapovat na stávající místní cesty. Funkce IntelliSense možná nebude fungovat zcela podle očekávání.", "Příliš mnoho vnořených uživatelsky definovaných převodů (možný cyklus převodních rutin)", - null, + "%sq už je v aktuálním rozsahu deklarovaný", null, null, null, @@ -3412,7 +3412,7 @@ "Členská funkce deklarovaná jako static nemůže mít explicitní parametr this.", "Explicitní parametr this musí být první deklarovaný parametr.", "Proměnná this se tady nepodporuje.", - "Porovnávací funkce s explicitním this nemůže být nastavena jako výchozí.", + "a comparison function with explicit \"this\" cannot be defaulted", "Funkce s explicitním this vyžaduje druhý operand.", "Příkazy if consteval a if not consteval nejsou v tomto režimu standardní.", "Vynechání () v deklarátoru výrazu lambda je v tomto režimu nestandardní.", @@ -3564,12 +3564,12 @@ "std::string_view, který se tady používá, není konzistentní s použitím v jiných vnitřních funkcích", "definice std::string_view neodpovídá předpokladům reflexe (žádné základní třídy a datoví členové pro ukazatele a délku)", "reflexe není reflexe konstantní hodnoty", - "pole s nulovou délkou se nedá vytvořit", - "délka (%d1) předaná make_constexpr_array je větší než počet dostupných elementů (%d2)", - "definice std::meta::infovec neodpovídá předpokladům reflexe (žádné základní třídy a datoví členové pro ukazatele, délku a kapacitu)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "chybná reflexe (%r) pro spojení výrazů", "%n již byl definován (předchozí definice %p)", - "objekt infovec není inicializovaný", + "infovec object not initialized", "extrakce typu %t1 není kompatibilní s danou odezvou (entita s typem %t2)", "reflektování sady přetížení není v tuto chvíli povolené", "tato vnitřní funkce vyžaduje reflexi pro instanci šablony", @@ -3750,7 +3750,7 @@ "Zkrácená syntaxe šablony funkce není standardní pro vodítka dedukce", "explicitní parametry „this“ jsou funkcí C++23", "specifikátory pole se v kontextech dedukce šablony nepodporují", - "druhý argument musí být vektor celočíselného typu se stejným počtem prvků jako první", + "the second argument must be an integer type with the same shape (a scalar or vector type) as the first argument", "argument musí být vektorem logických typů", "argument musí být ukazatel na skalární typ", "nesprávný typ argumentu (měl by být %t)", @@ -3783,5 +3783,20 @@ "Typ není podobný jazyku C kvůli tomuto lambda výrazu", "Kvalifikátor názvu výčtového typu je funkce jazyka C++11", "Neomezené sjednocení je funkce jazyka C++11", - "%sq už je v aktuálním rozsahu deklarovaný" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "the range passed to the metafunction cannot be iterated", + "interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq does not spell an identifier", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "Tato deklarace %n nedeklaruje stejný typ jako deklarace %p" ] diff --git a/Extension/bin/messages/de/messages.json b/Extension/bin/messages/de/messages.json index 588885286..ebfb0abb9 100644 --- a/Extension/bin/messages/de/messages.json +++ b/Extension/bin/messages/de/messages.json @@ -2713,11 +2713,11 @@ "Fehler bei der Metadateninitialisierung.", "Ungültige Umwandlung vom Basistyp zum abgeleiteten Typ (tatsächlicher abgeleiteter Klassentyp ist %t)", "Ungültiger Zugriff auf %n im Objekt des vollständigen Typs %t.", - "\"__auto_type\" ist hier unzulässig.", - "\"__auto_type\" erlaubt nicht mehrere Deklaratoren.", - "Die Initialisierung mit \"{...}\" ist für \"__auto_type\" unzulässig.", - "\"__auto_type\" muss ein Platzhalter für den vollständigen Typ der Variablen sein (nicht für eine Komponente dieses Typs).", - "Eine mit \"__auto_type\" deklarierte Variable erfordert einen Initialisierer.", + "%sq ist hier nicht zulässig.", + "%sq erlaubt nicht mehrere Deklaratoren.", + "initialization with \"{...}\" is not allowed for %sq", + "%sq muss ein Platzhalter für den vollständigen Typ der Variablen sein (nicht für eine Komponente dieses Typs).", + "Für eine mit %sq deklarierte Variable ist ein Initialisierer erforderlich.", "Die Integerkonstante muss größer oder gleich NULL sein.", "Der Typ muss ein integraler Typ sein.", "Der Ausdruck kann nicht interpretiert werden.", @@ -3000,7 +3000,7 @@ "Unbekannter Fehler. Es wurde keine IntelliSense PCH-Datei generiert.", "Mindestens ein Remotepfad kann vorhandenen lokalen Pfaden nicht zugeordnet werden. Die IntelliSense-Funktionen werden ggf. beeinträchtigt.", "zu viele geschachtelte benutzerdefinierte Konvertierungen (möglicher Zyklus von Konvertierungsroutinen)", - null, + "%sq wurde bereits im aktuellen Bereich deklariert.", null, null, null, @@ -3412,7 +3412,7 @@ "eine mit „statisch“ deklarierte Memberfunktion darf keinen expliziten „dies“-Parameter aufweisen", "ein expliziter „dies“-Parameter muss der erste deklarierte Parameter sein", "„dies“ ist hier nicht zulässig", - "eine Vergleichsfunktion mit explizitem „dies“ kann nicht als Standard verwendet werden", + "a comparison function with explicit \"this\" cannot be defaulted", "eine explizite „dies-2-Funktion erfordert einen Selektoroperanden", "„wenn consteval“ und „wenn nicht consteval“ sind in diesem Modus nicht Standard", "das Weglassen von „()“ in einem Lambda-Deklarator ist in diesem Modus nicht der Standard", @@ -3564,12 +3564,12 @@ "Die hier verwendete std::string_view ist inkonsistent mit der Verwendung in anderen systeminternen Funktionen.", "Die Definition von std::string_view stimmt nicht mit den Annahmen der Reflexion überein (keine Basisklassen und Datenmember für Zeiger und Länge).", "Die Reflexion ist nicht von einem konstanten Wert.", - "kann kein Array der Länge 0 (null) erstellen", - "Die an make_constexpr_array übergebene Länge (%d1) ist größer als die Anzahl der verfügbaren Elemente (%d2).", - "Die Definition von std::meta::infovec stimmt nicht mit den Annahmen der Reflexion überein (keine Basisklassen und Datenmember für Zeiger, Länge und Kapazität).", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "Ungültige Reflexion (%r) für Ausdrucks-Splice", "%n wurde bereits definiert (vorherige Definition %p)", - "Infovec-Objekt nicht initialisiert", + "infovec object not initialized", "Extrakt von Typ „%t1“ ist nicht mit der angegebenen Reflexion kompatibel (Entität vom Typ „%t2“)", "Das Reflektieren eines Überladungssatzes ist derzeit nicht zulässig.", "Diese systeminterne Funktion erfordert eine Reflexion für eine Vorlageninstanz.", @@ -3750,7 +3750,7 @@ "Die abgekürzte Funktionsvorlagensyntax entspricht nicht dem Standard für Deduktionsleitfäden.", "Explizite this-Parameter sind ein C++23-Feature.", "Arraykennzeichner werden in Kontexten zur Vorlagendeduktion nicht unterstützt.", - "Das zweite Argument muss ein ganzzahliger Vektor mit derselben Anzahl von Elementen wie das erste sein.", + "the second argument must be an integer type with the same shape (a scalar or vector type) as the first argument", "Das Argument muss ein Vektor boolescher Typen sein.", "Das Argument muss ein Zeiger auf einen skalaren Typ sein.", "Falscher Argumenttyp (sollte „%t“ sein)", @@ -3783,5 +3783,20 @@ "Der Typ ist aufgrund dieses Lambdaausdrucks nicht C-ähnlich.", "Ein Namensqualifizierer für einen Enumerationstyp ist ein C++11-Feature.", "Unbeschränkte Unions sind ein C++11-Feature.", - "%sq wurde bereits im aktuellen Bereich deklariert." + "Eine Paketerweiterung kann nicht als Argument für Nicht-Paket %n1 von %n2 verwendet werden.", + "Der an die Metafunktion übergebene Bereich kann nicht durchlaufen werden.", + "Interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "Ungültiges Tag in der „constexpr“-Diagnosesteuerungsoption: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq ist kein Bezeichner", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "Diese Deklaration von %n deklariert nicht denselben Typ wie die Deklaration %p." ] diff --git a/Extension/bin/messages/es/messages.json b/Extension/bin/messages/es/messages.json index 25532bdca..7aedebde0 100644 --- a/Extension/bin/messages/es/messages.json +++ b/Extension/bin/messages/es/messages.json @@ -2713,11 +2713,11 @@ "error en la inicialización de los metadatos", "conversión de base a derivada no válida (el tipo de clase derivada real es %t)", "acceso a %n no válido en un objeto del tipo %t completo", - "no se permite aquí \"__auto_type\"", - "\"__auto_type\" no admite varios declaradores", - "no se admite la inicialización con \"{...}\" para \"__auto_type\"", - "'__auto_type' debe ser un marcador de posición para el tipo completo de la variable (no para un componente de ese tipo)", - "una variable declarada con \"__auto_type\" requiere un inicializador", + "%sq no se permite aquí", + "%sq no permite varios declaradores", + "initialization with \"{...}\" is not allowed for %sq", + "%sq debe ser un marcador de posición para el tipo completo de la variable (no para un componente de ese tipo)", + "una variable declarada con %sq requiere un inicializador", "la constante de tipo entero debe ser mayor o igual que cero", "el tipo debe ser un tipo entero", "la expresión no se puede interpretar", @@ -3000,7 +3000,7 @@ "error desconocido. No se generó un archivo IntelliSense PCH.", "No se pueden asignar una o varias rutas remotas a las rutas locales actuales. La experiencia con IntelliSense puede degradarse.", "demasiadas conversiones anidadas definidas por el usuario (posible ciclo de rutinas de conversión)", - null, + "%sq ya se ha declarado en el ámbito actual", null, null, null, @@ -3412,7 +3412,7 @@ "una función miembro declarada con 'static' no puede tener un parámetro 'this' explícito", "un parámetro 'this' explícito debe ser el primer parámetro declarado", "“this” no se permite aquí", - "no se puede establecer de forma predeterminada una función de comparación con 'this' explícita", + "a comparison function with explicit \"this\" cannot be defaulted", "una función explícita 'this' requiere un operando selector", "'if consteval' y 'if not consteval' no son estándar en este modo", "omitir '()' en un declarador lambda no es estándar en este modo", @@ -3564,12 +3564,12 @@ "el valor de std::string_view que se usa aquí no es coherente con el uso en otros elementos intrínsecos", "la definición de std::string_view no coincide con las suposiciones de reflexión (no hay clases base ni miembros de datos para puntero y longitud)", "la reflexión no es la de un valor constante", - "no se puede crear una matriz de longitud cero", - "la longitud (%d1) pasada a make_constexpr_array es mayor que el número de elementos disponibles (%d2)", - "la definición de std::meta::infovec no coincide con las suposiciones de reflexión (no hay clases base ni miembros de datos para puntero, longitud y capacidad)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "reflexión incorrecta (%r) para la expresión splice", "%n ya se ha definido (definición anterior %p)", - "objeto infovec no inicializado", + "infovec object not initialized", "la extracción de tipo %t1 no es compatible con la reflexión especificada (entidad con el tipo %t2)", "no se permite actualmente reflejar un conjunto de sobrecargas", "este elemento intrínseco requiere una reflexión para una instancia de plantilla", @@ -3750,7 +3750,7 @@ "La sintaxis abreviada de las plantillas de funciones no es estándar para las guías de deducción", "los parámetros explícitos \"this\" son una característica de C++23", "no se admiten designadores de matriz en contextos de deducción de plantilla", - "el segundo argumento debe ser un vector de tipo entero con el mismo número de elementos que el primero", + "el segundo argumento debe ser un tipo entero con la misma forma (un tipo escalar o vectorial) que el primer argumento", "el argumento debe ser un vector de tipos booleanos", "el argumento debe ser un puntero a un tipo escalar", "tipo de argumento incorrecto (debe ser %t)", @@ -3783,5 +3783,20 @@ "el tipo no es similar a C debido a esta expresión lambda", "un calificador de nombre de tipo de enumeración es una característica de C++11", "las uniones sin restricciones son una característica de C++11", - "%sq ya se ha declarado en el ámbito actual" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "el intervalo pasado a la metafunción no se puede iterar", + "intérprete:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq no escribe un identificador", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "esta declaración de %n no declara el mismo tipo que la declaración %p" ] diff --git a/Extension/bin/messages/fr/messages.json b/Extension/bin/messages/fr/messages.json index 15217cf88..8fc9d961c 100644 --- a/Extension/bin/messages/fr/messages.json +++ b/Extension/bin/messages/fr/messages.json @@ -2713,11 +2713,11 @@ "échec de l'initialisation des métadonnées", "conversion de base vers dérivée non valide (le type réel de la classe dérivée est %t)", "accès non valide à %n dans l'objet de type complet %t", - "'__auto_type' non autorisé ici", - "'__auto_type' n'autorise pas plusieurs déclarateurs", - "initialisation avec '{...}' non autorisée pour '__auto_type'", - "'__auto_type' doit être un espace réservé pour le type complet de la variable (et non pour un composant de ce type)", - "une variable déclarée avec '__auto_type' nécessite un initialiseur", + "%sq not allowed here", + "%sq does not permit multiple declarators", + "initialization with \"{...}\" is not allowed for %sq", + "%sq doit être un espace réservé pour le type complet de la variable (et non pour un composant de ce type)", + "a variable declared with %sq requires an initializer", "une constante entière doit être supérieure ou égale à zéro", "le type doit être un type intégral", "impossible d'interpréter l'expression", @@ -3000,7 +3000,7 @@ "une erreur inconnue s'est produite. Aucun fichier PCH IntelliSense n'a été généré.", "Impossible de mapper un ou plusieurs chemins distants à des chemins locaux existants. L'expérience IntelliSense risque d'être dégradée.", "trop de conversions imbriquées définies par l’utilisateur(-trice) (cycle possible des routines de conversion)", - null, + "%sq a déjà été déclaré dans la portée actuelle", null, null, null, @@ -3412,7 +3412,7 @@ "une fonction membre déclarée avec « static » ne peut pas avoir de paramètre « this » explicite", "un paramètre « this » explicite doit être le premier paramètre déclaré", "« this » n’est pas autorisé ici", - "une fonction de comparaison avec « this » explicite ne peut pas être par défaut", + "a comparison function with explicit \"this\" cannot be defaulted", "une fonction « this » explicite nécessite un opérande de sélecteur", "« if consteval » et « if not consteval » ne sont pas standard dans ce mode", "l’omission de « () » dans un déclarateur lambda n’est pas standard dans ce mode", @@ -3564,12 +3564,12 @@ "std::string_view utilisé ici est incompatible avec son utilisation dans d'autres éléments intrinsèques", "la définition de std::string_view ne correspond pas aux hypothèses de réflexion (pas de classes de base ni de données membres pour le pointeur et la longueur)", "la réflexion n'est pas celle d'une valeur constante", - "impossible de créer un tableau de longueur nulle", - "la longueur (%d1) transmise à make_constexpr_array est supérieure au nombre d'éléments disponibles (%d2)", - "la définition de std::meta::infovec ne correspond pas aux hypothèses de réflexion (pas de classes de base ni de données membres pour le pointeur, la longueur et la capacité)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "réflexion incorrecte (%r) pour la splice d’expression", "%n a déjà été défini (définition précédente %p)", - "objet infovec non initialisé", + "infovec object not initialized", "l’extrait du type %t1 n’est pas compatible avec la réflexion indiquée (entité de type %t2)", "refléter un ensemble de surcharge n'est actuellement pas autorisé", "cette intrinsèque nécessite une réflexion pour une instance de modèle", @@ -3750,7 +3750,7 @@ "la syntaxe abrégée du modèle de fonction n’est pas standard pour les guides de déduction", "les paramètres explicites « this » sont une fonctionnalité de C++23", "les désignateurs de tableau ne sont pas pris en charge dans les contextes de déduction de modèle", - "Le deuxième argument doit être un vecteur de type entier avec le même nombre d’éléments que le premier", + "the second argument must be an integer type with the same shape (a scalar or vector type) as the first argument", "l’argument doit être un vecteur de types booléens", "l’argument doit être un pointeur vers un type scalaire", "type d’argument incorrect (il doit s’agir de %t)", @@ -3783,5 +3783,20 @@ "le type n’est pas similaire à C en raison de cette expression lambda", "un qualificateur de nom de type énumération est une fonctionnalité C++11", "les unions sans restriction sont une fonctionnalité C++11", - "%sq a déjà été déclaré dans la portée actuelle" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "the range passed to the metafunction cannot be iterated", + "interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq does not spell an identifier", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "this declaration of %n does not declare the same type as the declaration %p" ] diff --git a/Extension/bin/messages/it/messages.json b/Extension/bin/messages/it/messages.json index 84047e643..bcffbda92 100644 --- a/Extension/bin/messages/it/messages.json +++ b/Extension/bin/messages/it/messages.json @@ -2713,11 +2713,11 @@ "inizializzazione dei metadati non riuscita", "cast da base a derivato non valido (il tipo della classe derivata effettivo è %t)", "accesso non valido a %n nell'oggetto del tipo completo %t", - "'__auto_type' non è consentito in questo punto", - "'__auto_type' non consente l'uso di più dichiaratori", - "l'inizializzazione con '{...}' non è consentita per '__auto_type'", - "'__auto_type' deve essere un segnaposto per il tipo completo della variabile e non per un componente di tale tipo", - "in una variabile dichiarata con '__auto_type' è richiesto un inizializzatore", + "%sq non è consentito in questo punto", + "%sq non consente l'uso di più dichiaratori", + "initialization with \"{...}\" is not allowed for %sq", + "%sq deve essere un segnaposto per il tipo completo della variabile e non per un componente di tale tipo", + "in una variabile dichiarata con %sq è richiesto un inizializzatore", "la costante Integer deve essere maggiore o uguale a zero", "il tipo deve essere un tipo integrale", "non è possibile interpretare l'espressione", @@ -3000,7 +3000,7 @@ "si è verificato un errore sconosciuto. Non è stato generato alcun file PCH IntelliSense.", "Non è possibile eseguire il mapping di uno o più percorsi remoti a percorsi locali esistenti. L'operazione potrebbe influire negativamente sull'esperienza IntelliSense.", "troppe conversioni annidate definite dall'utente (possibile ciclo di routine di conversione)", - null, + "%sq già dichiarato nell'ambito corrente", null, null, null, @@ -3412,7 +3412,7 @@ "una funzione membro dichiarata con 'static' non può avere un parametro 'this' esplicito", "un parametro 'this' esplicito deve essere il primo parametro dichiarato", "'this' non è consentito qui", - "una funzione di confronto con 'this' esplicito non può essere predefinita", + "a comparison function with explicit \"this\" cannot be defaulted", "una funzione 'this' esplicita richiede un operando selettore", "'if consteval' e 'if not consteval' non sono standard in questa modalità", "l'omissione di '()' in un dichiaratore lambda non è standard in questa modalità", @@ -3564,12 +3564,12 @@ "std::string_view usato qui non è coerente con l'uso in altri intrinseci", "la definizione di std::string_view non corrisponde ai presupposti della reflection (nessuna classe di base e membri dati per puntatore e lunghezza)", "la reflection non è quella di un valore costante", - "non può creare una matrice di lunghezza zero", - "la lunghezza (%d1) passata a make_constexpr_array è maggiore del numero di elementi disponibili (%d2)", - "la definizione di std::meta::infovec non corrisponde ai presupposti della reflection (nessuna classe di base e membri dati per puntatore, lunghezza e capacità)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "reflection non valida (%r) per la splice dell'espressione", "%n è già stato definito (definizione precedente %p)", - "Oggetto infovec non inizializzato", + "infovec object not initialized", "il tipo di estrazione %t1 non è compatibile con la reflection specificata (entità con tipo %t2)", "la reflection di un set di overload non è attualmente consentita", "questo intrinseco richiede una reflection per un'istanza del modello", @@ -3750,7 +3750,7 @@ "la sintassi abbreviata del modello di funzione non è standard per le guide alla deduzione", "i parametri 'this' espliciti sono una funzionalità di C++23", "gli indicatori di matrice non sono supportati nei contesti di deduzione del modello", - "Il secondo argomento deve essere un vettore di tipo intero con lo stesso numero di elementi del primo", + "il secondo argomento deve essere di tipo intero e avere la stessa forma (scalare o vettoriale) del primo argomento", "l'argomento deve essere un vettore di tipi booleani", "l'argomento deve essere un puntatore a un tipo scalare", "tipo di argomento non corretto (deve essere %t)", @@ -3783,5 +3783,20 @@ "il tipo non è simile a C a causa di questa espressione lambda", "un qualificatore del nome di tipo enumerazione è una funzionalità di C++11", "le unioni senza restrizioni sono una funzionalità di C++11", - "%sq già dichiarato nell'ambito corrente" + "non è possibile usare un'espansione del pacchetto come argomento per non pack %n1 di %n2", + "non è possibile iterare l'intervallo passato alla metafunzione", + "interprete:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "tag non valido nell'opzione di controllo della diagnostica constexpr: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq non forma un identificatore", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "questa dichiarazione di %n non dichiara lo stesso tipo della dichiarazione %p" ] diff --git a/Extension/bin/messages/ja/messages.json b/Extension/bin/messages/ja/messages.json index 352ed9c04..33c35787f 100644 --- a/Extension/bin/messages/ja/messages.json +++ b/Extension/bin/messages/ja/messages.json @@ -2713,11 +2713,11 @@ "メタデータの初期化に失敗しました", "base から derived へのキャストが無効です (実際の derived クラス型は %t です)", "完全な型 %t のオブジェクトの %n へのアクセス権が無効です", - "'__auto_type' はここでは使用できません", - "'__auto_type' には複数の宣言子は使用できません", - "'__auto_type' に対する '{...}' での初期化は許可されていません", - "'__auto_type' は変数の完全な型 (その型のコンポーネントではなく) のプレースホルダーである必要があります", - "'__auto_type' で宣言された変数には初期化子が必要です", + "%sq はここでは使用できません", + "%sq には複数の宣言子は使用できません", + "initialization with \"{...}\" is not allowed for %sq", + "%sq は、変数の完全な型のプレースホルダーである必要があります (その型のコンポーネント用ではありません)", + "%sq で宣言された変数には初期化子が必要です", "整数型の定数はゼロ以上である必要があります", "型は整数型である必要があります", "式を解釈できません", @@ -3000,7 +3000,7 @@ "不明なエラーが発生しました。IntelliSense PCH ファイルは生成されませんでした。", "1 つ以上のリモート パスを既存のローカル パスにマップできません。IntelliSense の機能が低下する可能性があります。", "入れ子になったユーザー定義変換が多すぎます (変換ルーチンの可能なサイクル)", - null, + "%sq は現在のスコープで既に宣言されています", null, null, null, @@ -3412,7 +3412,7 @@ "'static' と宣言されたメンバー関数に明示的な 'this' パラメーターを指定することはできません", "明示的な 'this' パラメーターは最初に宣言されたパラメーターでなければなりません", "'this' はここでは許可されていません", - "明示的な 'this' を持つ比較関数は既定値にできません", + "a comparison function with explicit \"this\" cannot be defaulted", "明示的な 'this' 関数にはセレクター オペランドが必要です", "このモードでは、'if consteval' と 'if not consteval' は標準ではありません", "ラムダ宣言子での '()' の省略は、このモードでは非標準です", @@ -3564,12 +3564,12 @@ "ここで使用される std::string_view は、他の組み込み関数での使用と矛盾しています", "std::string_view の定義がリフレクションの想定と一致しません (ポインターと長さの基底クラスとデータ メンバーがありません)", "リフレクションは定数値のものではありません", - "長さ 0 の配列を作成できません", - "make_constexpr_array に渡された長さ (%d1) が使用可能な要素の数 (%d2) を超えています", - "std::meta::infovec の定義がリフレクションの想定と一致しません (ポインター、長さ、および容量の基底クラスとデータ メンバーがありません)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "式の継ぎ目のリフレクション (%r) が正しくありません", "%n は既に定義されています (前の定義 %p)", - "infovec オブジェクトが初期化されていません", + "infovec object not initialized", "型 %t1 の抽出は、指定されたリフレクション (型 %t2 のエンティティ) と互換性がありません", "オーバーロード セットのリフレクションは現在許可されていません", "この組み込み関数には、テンプレート インスタンスのリフレクションが必要です", @@ -3750,7 +3750,7 @@ "省略形の関数テンプレート構文は、推論ガイドでは非標準です", "明示的な 'this' パラメーターは C++23 の機能です", "テンプレート引数推論コンテキストでは配列指定子はサポートされていません", - "2 番目の引数は、1 番目の引数と同じ数の要素を持つ整数型のベクターである必要があります", + "2 番目の引数は、最初の引数と同じ図形 (スカラー型またはベクトル型) の整数型である必要があります", "引数はブール型のベクターである必要があります", "引数はスカラー型へのポインターである必要があります", "引数の型が正しくありません (必要な型: %t)", @@ -3783,5 +3783,20 @@ "このラムダ式のため、型は C-like ではありません", "列挙型名修飾子は C++11 の機能です", "無制限の共用体は C++11 機能です", - "%sq は現在のスコープで既に宣言されています" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "メタ関数に渡された範囲は反復できません", + "インタープリター:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "constexpr 診断制御オプションのタグが無効です: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq は識別子をスペルしません", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "%n のこの宣言は、宣言 %p と同じ型を宣言しません" ] diff --git a/Extension/bin/messages/ko/messages.json b/Extension/bin/messages/ko/messages.json index 7263448f6..ab7c28004 100644 --- a/Extension/bin/messages/ko/messages.json +++ b/Extension/bin/messages/ko/messages.json @@ -2713,11 +2713,11 @@ "메타데이터 초기화 실패", "기본에서 파생으로의 캐스트가 잘못되었습니다(실제 파생 클래스 형식은 %t임).", "완전한 형식 %t의 개체에서 %n에 대한 액세스가 잘못되었습니다.", - "'__auto_type'은 여기에 사용할 수 없습니다.", - "'__auto_type'에는 선언자를 여러 개 사용할 수 없습니다.", - "'__auto_type'에는 '{...}'를 사용한 초기화를 사용할 수 없습니다.", - "'__auto_type'은 완전한 변수 형식에 대한 구성 요소가 아니라 자리 표시자여야 합니다.", - "'__auto_type'으로 선언된 변수에는 이니셜라이저가 필요합니다.", + "%sq은(는) 여기에서 사용할 수 없습니다.", + "%sq에는 선언자를 여러 개 사용할 수 없습니다.", + "initialization with \"{...}\" is not allowed for %sq", + "%sq은(는) 변수의 전체 형식을 나타내는 자리 표시자여야 하며, 해당 형식의 구성 요소를 나타내는 자리 표시자여서는 안 됩니다.", + "%sq (으)로 선언된 변수에는 이니셜라이저가 필요합니다.", "정수 상수는 0보다 크거나 같아야 합니다.", "형식은 정수 형식이어야 합니다.", "식을 해석할 수 없습니다.", @@ -3000,7 +3000,7 @@ "알 수 없는 오류가 발생했습니다. IntelliSense PCH 파일이 생성되지 않았습니다.", "하나 이상의 원격 경로를 기존 로컬 경로에 매핑할 수 없습니다. IntelliSense 성능이 저하될 수 있습니다.", "중첩된 사용자 정의 변환이 너무 많음(변환 루틴의 순환이 발생할 수 있음).", - null, + "현재 범위에 이미 %sq이(가) 선언되어 있습니다.", null, null, null, @@ -3412,7 +3412,7 @@ "'static'으로 선언된 멤버 함수에는 명시적 'this' 매개 변수를 사용할 수 없습니다.", "명시적 'this' 매개 변수는 첫 번째 선언된 매개 변수여야 합니다.", "여기서는 'this'를 사용할 수 없습니다.", - "명시적 'this'를 사용하는 비교 함수는 기본값으로 사용할 수 없습니다.", + "a comparison function with explicit \"this\" cannot be defaulted", "명시적 'this' 함수에는 선택기 피연산자가 필요합니다.", "'if consteval' 및 'if not consteval'은 이 모드에서 표준이 아닙니다.", "람다 선언자에서 '()'를 생략하는 것은 이 모드에서 표준이 아닙니다.", @@ -3564,12 +3564,12 @@ "여기에 사용된 std::string_view는 다른 내장 함수에서의 사용과 일치하지 않습니다.", "std::string_view의 정의가 리플렉션의 가정과 일치하지 않습니다(포인터 및 길이에 대한 기본 클래스 및 데이터 멤버 없음).", "리플렉션이 상수 값의 리플렉션이 아닙니다.", - "길이가 0인 배열을 만들 수 없음", - "make_constexpr_array에 전달된 길이(%d1)가 사용 가능한 요소 수보다 큽니다(%d2).", - "std::meta::infovec의 정의가 리플렉션의 가정과 일치하지 않습니다(포인터, 길이 및 용량에 대한 기본 클래스 및 데이터 멤버가 없음).", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "식 스플라이스에 대한 잘못된 리플렉션(%r)", "%n이(가) 이미 정의되었습니다(이전 정의 %p).", - "infovec 개체가 초기화되지 않음", + "infovec object not initialized", "%t1 형식의 추출은 지정된 리플렉션(%t2 형식의 엔터티)과 호환되지 않습니다.", "오버로드 집합을 반영하는 것은 현재 허용되지 않습니다.", "이 내장 함수에는 템플릿 인스턴스에 대한 리플렉션이 필요합니다.", @@ -3750,7 +3750,7 @@ "약식 함수 템플릿 구문은 추론 가이드에 대한 표준이 아닙니다.", "명시적 'this' 매개 변수는 C++23 기능입니다.", "배열 지정자는 템플릿 추론 컨텍스트에서 지원되지 않습니다.", - "두 번째 인수는 첫 번째 인수와 같은 수의 요소를 가진 정수 형식의 벡터여야 합니다.", + "두 번째 인수는 첫 번째 인수와 동일한 형태(스칼라 또는 벡터 형식)의 정수 형식이어야 합니다.", "인수는 부울 형식의 벡터여야 합니다.", "인수는 스칼라 형식을 가리키는 포인터여야 합니다.", "인수 형식이 잘못되었습니다. %t여(이어)야 합니다.", @@ -3783,5 +3783,20 @@ "이 람다 식 때문에 형식이 C와 유사하지 않음", "열거형 형식 이름 한정자는 C++11 기능임", "제한 없는 공용 구조체는 C++11 기능임", - "현재 범위에 이미 %sq이(가) 선언되어 있습니다." + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "메타 함수에 전달된 범위는 반복할 수 없습니다.", + "인터프리터:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "constexpr 진단 제어 옵션의 잘못된 태그: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq does not spell an identifier", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "이 선언 %n은(는) 선언 %p과(와) 동일한 형식을 선언하지 않습니다." ] diff --git a/Extension/bin/messages/pl/messages.json b/Extension/bin/messages/pl/messages.json index 1c5db291b..128c0aa6e 100644 --- a/Extension/bin/messages/pl/messages.json +++ b/Extension/bin/messages/pl/messages.json @@ -2713,11 +2713,11 @@ "nie można zainicjować metadanych", "nieprawidłowe rzutowanie typu bazowego na pochodny (rzeczywisty typ klasy pochodnej to %t)", "nieprawidłowy dostęp do elementu %n w obiekcie, którego pełny typ to %t", - "element „__auto_type” jest niedozwolony w tym miejscu", - "element „__auto_type” nie zezwala na wiele deklaratorów", - "inicjowanie za pomocą deklaracji „{...}” jest niedozwolone dla elementu „__auto_type”", - "element „__auto_type” musi być symbolem zastępczym dla pełnego typu zmiennej (a nie składnika tego typu)", - "zmienna zadeklarowana za pomocą elementu „__auto_type” wymaga inicjatora", + "element %sq nie jest dozwolony w tym miejscu", + "element %sq nie zezwala na wiele deklaratorów", + "initialization with \"{...}\" is not allowed for %sq", + "%sq musi być symbolem zastępczym dla pełnego typu zmiennej (nie dla składnika tego typu)", + "zmienna zadeklarowana za pomocą elementu %sq wymaga inicjatora", "stała całkowita musi być równa zero lub większa", "typ musi być typem całkowitym", "nie można zinterpretować wyrażenia", @@ -3000,7 +3000,7 @@ "wystąpił nieznany błąd. Nie wygenerowano pliku PCH funkcji IntelliSense.", "Nie można zamapować co najmniej jednej ścieżki zdalnej na istniejące ścieżki lokalne. Może to mieć negatywny wpływ na działanie funkcji IntelliSense.", "zbyt wiele zagnieżdżonych konwersji zdefiniowanych przez użytkownika (możliwy cykl procedur konwersji)", - null, + "element %sq został już zadeklarowany w bieżącym zakresie", null, null, null, @@ -3412,7 +3412,7 @@ "funkcja składowa zadeklarowana za pomocą elementu „static” nie może mieć jawnego parametru „this”", "jawny parametr „this” musi być pierwszym zadeklarowanym parametrem", "Element „this” jest niedozwolony w tym miejscu", - "nie można domyślnie określić funkcji porównania z jawnym elementem „this”", + "a comparison function with explicit \"this\" cannot be defaulted", "jawna funkcja „this” wymaga operandu selektora", "Instrukcje „if consteval” i „if not consteval” nie są standardowe w tym trybie", "pominięcie elementu „()” w deklaratorze lambda jest niestandardowe w tym trybie", @@ -3564,12 +3564,12 @@ "std::string_view użyte w tym miejscu jest niespójne z użyciem w innych elementach wewnętrznych", "definicja elementu std::string_view nie jest zgodna z założeniami odbicia (brak klas bazowych i składowych danych dla wskaźnika i długości)", "odbicie nie jest wartością stałą", - "nie można utworzyć tablicy o zerowej długości", - "długość (%d1) przekazana do make_constexpr_array jest większa niż liczba dostępnych elementów (%d2)", - "definicja elementu std::meta::infovec nie jest zgodna z założeniami odbicia (brak klas bazowych i składowych danych dla wskaźnika, długości i pojemności)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "złe odbicie (%r) dla splice wyrażenia", "Element %n został już zdefiniowany (poprzednia definicja :%p)", - "obiekt infovec nie został zainicjowany", + "infovec object not initialized", "wyodrębnienie typu %t1 jest niezgodne z danym odbiciem (jednostka o typie %t2)", "odzwierciedlanie zestawu przeciążeń jest obecnie niedozwolone", "ta wewnętrzna funkcja wymaga odbicia dla wystąpienia szablonu", @@ -3750,7 +3750,7 @@ "skrócona składnia szablonu funkcji jest niestandardowa dla przewodników dedukcji", "jawne parametry „this” są funkcją języka C++23", "desygnatory tablic nie są obsługiwane w kontekstach dedukcji szablonów", - "drugi argument musi być wektorem typu całkowitego o takiej samej liczbie elementów jak pierwszy", + "drugi argument musi być typem liczby całkowitej o tym samym kształcie (typ skalarny lub wektorowy) co pierwszy argument", "argument musi być wektorem typów logicznych", "argument musi być wskaźnikiem do typu skalarnego", "niepoprawny typ argumentu (powinien być %t)", @@ -3783,5 +3783,20 @@ "typ nie jest C-podobny z powodu tego wyrażenia lambda", "kwalifikator nazwy typu wyliczeniowego jest funkcją języka C++11", "nieograniczone unie są funkcją języka C++11", - "element %sq został już zadeklarowany w bieżącym zakresie" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "zakresu przekazanego do metafunkcji nie można iterować", + "interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "nieprawidłowy tag w opcji kontroli diagnostycznej constexpr: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq nie określa pisowni identyfikatora", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "deklaracja %n nie deklaruje tego samego typu co deklaracja %p" ] diff --git a/Extension/bin/messages/pt-br/messages.json b/Extension/bin/messages/pt-br/messages.json index f607f807f..73cf91a4f 100644 --- a/Extension/bin/messages/pt-br/messages.json +++ b/Extension/bin/messages/pt-br/messages.json @@ -2713,11 +2713,11 @@ "falha na inicialização de metadados", "Conversão inválida de base para derivada (o tipo real da classe derivada é %t)", "acesso inválido a %n no objeto do tipo %t completo", - "'__auto_type' não é permitido aqui", - "'__auto_type' não permite vários declaradores", - "a inicialização com '{...}' não é permitida para '__auto_type'", - "\"__auto_type\" deve ser um espaço reservado para o tipo de variável completo (não para um componente desse tipo)", - "uma variável declarada com '__auto_type' exige um inicializador", + "%sq not allowed here", + "%sq does not permit multiple declarators", + "initialization with \"{...}\" is not allowed for %sq", + "%sq deve ser um espaço reservado para o tipo completo da variável (não para um componente desse tipo)", + "a variable declared with %sq requires an initializer", "o constante inteiro deve ser maior ou igual a zero", "o tipo deve ser um tipo integral", "não é possível interpretar a expressão", @@ -3000,7 +3000,7 @@ "erro desconhecido. Não foi gerado um arquivo PCH do IntelliSense.", "Um ou mais caminhos remotos não podem ser mapeados para os caminhos locais existentes. A experiência do IntelliSense pode ser degradada.", "muitas conversões aninhadas definidas pelo usuário (possível ciclo de rotinas de conversão)", - null, + "%sq já foi declarado no escopo atual", null, null, null, @@ -3412,7 +3412,7 @@ "uma função membro declarada com 'static' não pode ter um parâmetro 'this' explícito", "um parâmetro 'this' explícito deve ser o primeiro parâmetro declarado", "'this' não é permitido aqui", - "uma função de comparação com 'this' explícito não pode ser padrão", + "a comparison function with explicit \"this\" cannot be defaulted", "uma função 'this' explícita requer um operando de seletor", "'if consteval' e 'if not consteval' não são padrão neste modo", "omitir '()' em um declarador lambda não é padrão neste modo", @@ -3564,12 +3564,12 @@ "std::string_view usado aqui é inconsistente com o uso em outros elementos intrínsecos", "a definição de std::string_view não corresponde a suposições de reflexão (nenhuma classe base nem membros de dados para ponteiro e comprimento)", "a reflexão não é a de um valor constante", - "não é possível criar uma matriz de comprimento zero", - "o comprimento (%d1) passado para make_constexpr_array é maior que o número de elementos disponíveis (%d2)", - "a definição de std::meta::infovec não corresponde a suposições de reflexão (nenhuma classe base nem membros de dados para ponteiro, comprimento e capacidade)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "reflexão incorreta (%r) para a expressão splice", "%n já foi definido (definição anterior %p)", - "objeto infovec não inicializado", + "infovec object not initialized", "o extrato do tipo %t1 não é compatível com a reflexão fornecida (entidade com tipo %t2)", "refletir um conjunto de sobrecargas não é permitido no momento", "este elemento intrínseco requer uma reflexão para uma instância de modelo", @@ -3750,7 +3750,7 @@ "a sintaxe abreviada de template de função é não padrão para guias de dedução", "parâmetros explícitos de 'this' são um recurso do C++23", "designadores de matriz não têm suporte em contextos de dedução de modelo", - "o segundo argumento deve ser um vetor de tipo inteiro com o mesmo número de elementos que o primeiro", + "the second argument must be an integer type with the same shape (a scalar or vector type) as the first argument", "o argumento deve ser um vetor de tipos boolianos", "o argumento deve ser um ponteiro para um tipo escalar", "tipo de argumento incorreto (deveria ser %t)", @@ -3783,5 +3783,20 @@ "o tipo não é semelhante a C devido a esta expressão lambda", "um qualificador de nome de tipo de enumeração é um recurso do C++11", "uniões irrestritas são um recurso do C++11", - "%sq já foi declarado no escopo atual" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "the range passed to the metafunction cannot be iterated", + "interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq does not spell an identifier", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "Esta declaração de %n não declara o mesmo tipo que a declaração %p" ] diff --git a/Extension/bin/messages/ru/messages.json b/Extension/bin/messages/ru/messages.json index a3db081fe..27383c50f 100644 --- a/Extension/bin/messages/ru/messages.json +++ b/Extension/bin/messages/ru/messages.json @@ -2713,11 +2713,11 @@ "сбой инициализации метаданных", "недопустимое приведение базового класса к производному (фактический тип производного класса — %t)", "недопустимый доступ к %n в объекте полного типа %t", - "Значение \"__auto_type\" здесь запрещено", - "\"__auto_type\" не допускает множество операторов объявления.", - "инициализация с помощью \"{...}\" запрещена для \"__auto_type\"", - "Значение \"__auto_type\" должно быть заполнителем для полного типа переменной (а не для компонента этого типа)", - "для переменной, объявленной с \"__auto_type\", требуется инициализатор", + "%sq здесь не разрешен", + "%sq does not permit multiple declarators", + "initialization with \"{...}\" is not allowed for %sq", + "%sq должен быть заполнителем для полного типа переменной (а не для компонента этого типа)", + "для переменной, объявленной с помощью %sq, требуется инициализатор", "целочисленная константа должна быть больше нуля или равна нулю", "тип должен быть целочисленным", "невозможно интерпретировать выражение", @@ -3000,7 +3000,7 @@ "произошла неизвестная ошибка. PCH-файл IntelliSense не был создан.", "Один или несколько удаленных путей не могут быть сопоставлены с существующими локальными путями. Использование IntelliSense может быть ограничено.", "слишком много вложенных пользовательских преобразований (возможен цикл процедур преобразования)", - null, + "%sq уже объявлено в текущей области", null, null, null, @@ -3412,7 +3412,7 @@ "функция-член, объявленная со значением \"static\", не может иметь явный параметр \"this\"", "явный параметр \"this\" должен быть первым объявленным параметром", "\"this\" здесь не разрешено", - "функция сравнения с явным параметром \"this\" не может быть задана по умолчанию", + "a comparison function with explicit \"this\" cannot be defaulted", "для явной функции \"this\" требуется операнд селектора", "\"if consteval\" и \"if not consteval\" не являются стандартными в этом режиме", "опущение \"()\" в лямбда-операторе объявления является нестандартным в этом режиме", @@ -3564,12 +3564,12 @@ "используемый здесь std::string_view несовместим с использованием в других встроенных функциях.", "определение std::string_view не соответствует предположениям об отражении (нет базовых классов и элементов данных для указателя и длины)", "отражение не является отражением постоянной величины", - "не удается сделать массив нулевой длины", - "длина (%d1), переданная в make_constexpr_array, больше числа доступных элементов (%d2)", - "определение std::meta::infovec не соответствует предположениям об отражении (нет базовых классов и элементов данных для указателя, длины и емкости)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "плохое отражение (%r) для выражения splice", "%n уже определено (предыдущее определение %p)", - "объект infovec не инициализирован", + "infovec object not initialized", "извлечение типа %t1 несовместимо с заданным отражением (сущность типа %t2)", "отражение набора перегрузки сейчас не разрешено", "эта внутренняя функция требует отражения для экземпляра шаблона", @@ -3750,7 +3750,7 @@ "сокращенный синтаксис шаблона функции не является стандартным для правил дедукции", "явные параметры this — это функция C++23", "обозначения элементов массива не поддерживаются в контекстах дедукции шаблонов", - "второй аргумент должен быть вектором целочисленного типа с тем же количеством элементов, что и первый", + "второй аргумент должен иметь целочисленный тип и ту же форму, что и первый аргумент (скалярный или векторный тип)", "аргумент должен быть вектором логических типов", "аргумент должен быть указателем на скалярный тип", "неправильный тип аргумента (должен быть %t)", @@ -3783,5 +3783,20 @@ "тип не является C-подобным из-за этого лямбда-выражения", "квалификатор имени типа перечисления — это функция C++11", "неограниченные объединения — это функция C++11", - "%sq уже объявлено в текущей области" + "расширение пакета нельзя использовать в качестве аргумента для элемента, не являющегося пакетом %n1 из %n2", + "диапазон, переданный в метафункцию, не поддается итерации", + "интерпретатор:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "недопустимый тег в параметре диагностического контроля constexpr: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq не образует идентификатор", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "это объявление %n не объявляет тот же тип, что и объявление %p" ] diff --git a/Extension/bin/messages/tr/messages.json b/Extension/bin/messages/tr/messages.json index 1b3c8999e..13cbb91b5 100644 --- a/Extension/bin/messages/tr/messages.json +++ b/Extension/bin/messages/tr/messages.json @@ -2713,11 +2713,11 @@ "meta veriler başlatılamadı", "temelden türetilmişe dönüştürme işlemi geçersiz (gerçek türetilmiş sınıf türü %t)", "tam %t türünün nesnesindeki %n öğesine geçersiz erişim", - "'__auto_type' öğesine burada izin verilmez", - "'__auto_type' birden fazla bildirimciye izin vermez", - "'__auto_type' için '{...}' ile başlatmaya izin verilmez", - "'__auto_type' öğesi, değişken türünün tamamı için (türün bileşeni için değil) yer tutucu olmalıdır", - "'__auto_type' ile bildirilen değişken için başlatıcı gerekir", + "%sq not allowed here", + "%sq does not permit multiple declarators", + "initialization with \"{...}\" is not allowed for %sq", + "%sq must be a placeholder for the complete type of the variable (not for a component of that type)", + "a variable declared with %sq requires an initializer", "sabit tam sayı değeri sıfırdan büyük veya sıfıra eşit olmalıdır", "tür, tam sayı türünde olmalıdır", "ifade yorumlanamıyor", @@ -3000,7 +3000,7 @@ "bilinmeyen bir hata oluştu. IntelliSense PCH dosyası oluşturulmadı.", "Bir veya daha fazla uzak yol, mevcut yerel yollarla eşlenemiyor. IntelliSense deneyimi bozulabilir.", "Çok fazla iç içe kullanıcı tanımlı dönüştürme var (dönüştürme yordamlarının olası döngüsü)", - null, + "%sq has already been declared in the current scope", null, null, null, @@ -3412,7 +3412,7 @@ "'static' ile bildirilen üye işlevi açık bir 'this' parametresine sahip olamaz", "açık 'this' parametresi, bildirilen ilk parametre olmalıdır", "burada 'this' kullanımına izin verilmiyor", - "açık 'this' içeren karşılaştırma işlevi varsayılan olarak ayarlanamaz", + "a comparison function with explicit \"this\" cannot be defaulted", "açık 'this' işlevi bir seçici işleneni gerektirir", "'if consteval' ve 'if not consteval' bu modda standart değil", "lambda bildirimcisinde '()' atlanması bu modda standart değil", @@ -3564,12 +3564,12 @@ "burada kullanılan std::string_view diğer iç öğelerde kullanım ile tutarsızlık gösteriyor", "std::string_view tanımı yansıtma varsayımları ile eşleşmiyor (işaretçi ve uzunluk için temel sınıf ve veri üyesi yok)", "yansıma sabit bir değer değil", - "sıfır uzunluklu bir dizi oluşturulamıyor", - "make_constexpr_array uzunluğu (%d1) kullanılabilir öğe sayısından (%d2) daha büyük", - "std::meta::infovec tanımı yansıtma varsayımları ile eşleşmiyor (işaretçi, uzunluk ve kapasite için temel sınıf ve veri üyesi yok)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "ifade eşleme için hatalı yansıma (%r)", "%n zaten tanımlandı (önceki tanım %p)", - "infovec nesnesi başlatılamadı", + "infovec object not initialized", "%t1 türündeki ayıklama verilen yansımayla (%t2 türüne sahip varlık) uyumlu değil", "aşırı yükleme kümesini yansıtmaya şu anda izin verilmiyor", "bu iç öğe, bir şablon örneği için yansıma gerektiriyor", @@ -3750,7 +3750,7 @@ "kısaltılmış işlev şablonu sözdizimi çıkarsama kılavuzları için standart değil", "açık 'this' parametreleri bir C++23 özelliğidir", "dizi belirleyicileri şablon çıkarsama bağlamlarında desteklenmez", - "ikinci bağımsız değişken, birinciyle aynı sayıda öğeye sahip tamsayı türünde bir vektör olmalıdır", + "the second argument must be an integer type with the same shape (a scalar or vector type) as the first argument", "bağımsız değişken, boole türlerinden bir vektör olmalıdır", "bağımsız değişken, skaler bir türe yönelik işaretçi olmalıdır", "yanlış bağımsız değişken türü (%t olmalıdır)", @@ -3783,5 +3783,20 @@ "bu lambda ifadesi nedeniyle tür C benzeri değil", "sabit listesi türü ad niteleyicisi bir C++11 özelliğidir", "kısıtlanmamış birleşimler bir C++11 özelliğidir", - "geçerli kapsamda, %sq önceden de tanımlanmış" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "the range passed to the metafunction cannot be iterated", + "interpreter:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq does not spell an identifier", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "this declaration of %n does not declare the same type as the declaration %p" ] diff --git a/Extension/bin/messages/zh-cn/messages.json b/Extension/bin/messages/zh-cn/messages.json index bccbe9be2..bffb120e8 100644 --- a/Extension/bin/messages/zh-cn/messages.json +++ b/Extension/bin/messages/zh-cn/messages.json @@ -2713,11 +2713,11 @@ "元数据初始化失败", "从基类到派生类的转换无效(实际派生类类型是 %t)", "对完整类型 %t 的对象中的 %n 的访问无效", - "此处禁止使用 \"__auto_type\"", - "\"__auto_type\" 不允许多个声明符", - "\"__auto_type\" 不允许使用 \"{...}\" 进行初始化", - "\"__auto_type\" 必须是完整类型变量的占位符(而不是该类型组件的占位符)", - "使用 \"__auto_type\" 声明的变量需要初始化表达式", + "此处不允许使用 %sq", + "%sq 不允许使用多个声明符", + "initialization with \"{...}\" is not allowed for %sq", + "%sq 必须是用于完整变量类型的占位符(不适用于此类型的组件)", + "a variable declared with %sq requires an initializer", "整型常数必须大于等于零", "类型必须是整型类型", "表达式无法解释", @@ -3000,7 +3000,7 @@ "出现了未知错误。未生成 IntelliSense PCH 文件。", "一个或多个远程路径无法映射到现有本地路径。IntelliSense 体验可能会降级。", "嵌套的用户定义转换过多(可能存在转换例程循环)", - null, + "已在当前范围内声明 %sq", null, null, null, @@ -3412,7 +3412,7 @@ "使用 'static' 声明的成员函数不能具有显式 'this' 参数", "显式 'this' 参数必须是第一个声明的参数", "此处不允许使用 'this'", - "不能默认使用具有显式 'this' 的比较函数", + "a comparison function with explicit \"this\" cannot be defaulted", "显式 'this' 函数需要选择器操作数", "在此模式下,'if consteval' 和 'if not consteval' 不标准", "在此模式下,在 lambda 声明符中省略 '()' 为不标准操作", @@ -3564,12 +3564,12 @@ "此处使用的 std::string_view 与其他内部函数中的使用不一致", "std::string_view 的定义与反射的假设不匹配(指针和长度没有基类和数据成员)", "反射不是常量值的反射", - "无法创建零长度的数组", - "传递到 std::meta::substitute 的长度(%d1)比可用元素数量(%d2)要长", - "std::meta::infovec 的定义与反射的假设不匹配(指针、长度和容量没有基类和数据成员)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "表达式拼接的错误反射(%r)", "已定义 %n (之前的定义 %p)", - "infovec 对象未初始化", + "infovec object not initialized", "类型 %t1 的提取与给定的反射(类型为 %t2 的实体)不兼容", "当前不允许反射重载集", "此内部函数需要模板实例的反射", @@ -3750,7 +3750,7 @@ "缩写函数模板语法对于推导指南是不标准的", "显式 \"this\" 参数是 C++23 功能", "模板推导上下文中不支持数组指示符", - "第二个参数必须是整数类型的向量,且元素数量与第一个参数相同", + "第二个参数必须是与第一个参数具有相同形状(标量或矢量类型)的整数类型", "参数必须是布尔类型的向量", "参数必须是指向标量类型的指针", "参数类型不正确(应为 %t)", @@ -3783,5 +3783,20 @@ "由于此 lambda 表达式,该类型不是 C 风格", "枚举类型名称限定符是 C++11 功能", "无限制联合是 C++11 功能", - "已在当前范围内声明 %sq" + "包扩展不能用作 %n2 的非包 %n1 的参数", + "传递给元函数的范围无法迭代", + "解释器:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "constexpr 诊断控制选项中的标记无效: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq 未拼写为标识符", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "%n 的此声明与声明 %p 所声明的类型不同" ] diff --git a/Extension/bin/messages/zh-tw/messages.json b/Extension/bin/messages/zh-tw/messages.json index cc2a900d1..f0bf48136 100644 --- a/Extension/bin/messages/zh-tw/messages.json +++ b/Extension/bin/messages/zh-tw/messages.json @@ -2713,11 +2713,11 @@ "中繼資料初始化失敗", "從基底到衍生的轉換無效 (實際衍生類別類型是 %t)", "對完整類型 %t 物件中 %n 的存取無效", - "此處不允許 '__auto_type'", - "'__auto_type' 不允許多個宣告子", - "'__auto_type' 不允許使用了 '{...}' 的初始化", - "'__auto_type' 必須是完整變數類型 (而非該類型的元件) 的預留位置", - "使用 '__auto_type' 所宣告的變數需要初始設定式", + "這裡不允許 %sq", + "%sq 不允許多個宣告子", + "initialization with \"{...}\" is not allowed for %sq", + "%sq 必須是變數完整類型 (而不是該類型的元件) 的預留位置", + "使用 %sq 所宣告的變數需要初始設定式", "整數常數必須大於或等於零", "類型必須是整數類型", "無法解譯運算式", @@ -3000,7 +3000,7 @@ "發生未知的錯誤。未產生 IntelliSense PCH 檔案。", "有一或多個遠端路徑無法對應到現有的本機路徑。IntelliSense 的效能可能會變差。", "巢狀的使用者定義轉換太多 (轉換常式可能形成循環)", - null, + "已經在目前的範圍宣告 %sq", null, null, null, @@ -3412,7 +3412,7 @@ "以 'static' 宣告的成員函式不能有明確的 'this' 參數", "明確 'this' 參數必須是第一個宣告的參數", "這裡不允許 'this'", - "無法預設具有明確 'this' 的比較函數", + "a comparison function with explicit \"this\" cannot be defaulted", "明確 'this' 函數需要選取器運算元", "在此模式中,'if consteval' 和 'if not consteval' 不是標準", "在此模式中,在 Lambda 宣告子中省略 '()' 並非標準", @@ -3564,12 +3564,12 @@ "在這裡使用的 std::string_view 與其他內部函式的使用不一致", "std::string_view 的定義不符合反映假設 (指標和長度沒有基底類別和資料成員)", "反映不是常數值的反映", - "不能使陣列長度為零", - "傳遞至 make_constexpr_array 的長度 (%d1) 大於可用的元素數目 (%d2)", - "std::meta::infovec 的定義不符合反映假設 (指標、長度和容量沒有基底類別和資料成員)", + "cannot make a zero-length array", + "length (%d1) passed to make_constexpr_array is larger than number of elements available (%d2)", + "definition of std::meta::infovec does not match assumptions of reflection (no base classes and data members for pointer, length, and capacity)", "運算式 splice 的不良反映 (%r)", "%n 已定義 (先前的定義 %p)", - "infovec 物件未初始化", + "infovec object not initialized", "類型 %t1 的擷取與給定的反映 (類型為 %t2 的實體) 不相容", "目前不允許反射多載集", "此內部函式需要範本執行個體的反映", @@ -3750,7 +3750,7 @@ "簡化函式範本語法在推導指南中並非標準用法", "明確 'this' 參數是 C++23 功能", "範本推導內容中不支援陣列指定元", - "第二個引數必須是整數類型的向量,其元素數目必須與第一個相同", + "第二個引數必須是與第一個引數具有相同形狀 (純量或向量類型) 的整數類型", "引數必須是布林型別的向量", "引數必須是純量類型的指標", "不正確的引數類型 (應該是 %t)", @@ -3783,5 +3783,20 @@ "因為這個 Lambda 運算式,類型不是 C 樣式", "列舉型別名稱限定詞是 C++11 功能", "不受限的聯合是 C++11 功能", - "已經在目前的範圍宣告 %sq" + "a pack expansion cannot be used as an argument for non-pack %n1 of %n2", + "傳遞給元函式的範圍無法逐一巡覽", + "解譯器:", + "%s1 %s2", + "%s1 %s2", + "%s1 %s2", + "a call to \"__builtin_constexpr_diag\" requires three arguments", + "the first argument in a call to \"__builtin_constexpr_diag\" must be 0 (remark), 1 (warning), 2 (error), 16 (remark at caller), 17 (warning at caller), or 18 (error at caller)", + "a string literal or an object with the representation of std::string_view is required for the tag and the message in a call to \"__builtin_constexpr_diag\"", + "the tag in a call to \"__builtin_constexpr_diag\" may contain only letters, digits, and underscores", + "invalid tag in constexpr diagnostic control option: %s", + "a token sequence must be introduced by \"^^\"", + "expected an interpolator (\"\\[\", \"\\[:\", \"\\{\", \"\\val\", or \"\\str\")", + "%sq 無法拼出識別碼", + "the operand of a \"\\{...}\" interpolator is not a token sequence", + "此宣告 %n 的型別與宣告 %p 的型別不同" ] From e38cfef2b93322bee30f7b8a3912bb54ad107890 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com> Date: Fri, 9 Oct 2026 13:11:28 -0700 Subject: [PATCH 8/9] Enable hide/show of type size/alignment (#14822) --- Extension/package.json | 15 +++++ Extension/package.nls.json | 7 +++ Extension/src/LanguageServer/client.ts | 5 +- .../src/LanguageServer/configurations.ts | 4 +- Extension/src/LanguageServer/extension.ts | 23 ++++++- Extension/src/LanguageServer/settings.ts | 6 +- Extension/test/minBinaryVersion.json | 2 +- .../assets/SingleRootProject/quickInfo.cpp | 7 ++- .../tests/quickInfo.test.ts | 62 +++++++++++++++++++ 9 files changed, 118 insertions(+), 13 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 6c4efb682..29a55638d 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1061,6 +1061,12 @@ "markdownDescription": "%c_cpp.configuration.hoverShowIntegralValuesInHexadecimal.markdownDescription%", "scope": "resource" }, + "C_Cpp.hoverShowTypeSizeAndAlignment": { + "type": "boolean", + "default": true, + "markdownDescription": "%c_cpp.configuration.hoverShowTypeSizeAndAlignment.markdownDescription%", + "scope": "resource" + }, "C_Cpp.errorSquiggles": { "type": "string", "enum": [ @@ -4025,6 +4031,11 @@ "title": "%c_cpp.command.toggleDimInactiveRegions.title%", "category": "C/C++" }, + { + "command": "C_Cpp.ToggleTypeSizeAndAlignment", + "title": "%c_cpp.command.toggleTypeSizeAndAlignment.title%", + "category": "C/C++" + }, { "command": "C_Cpp.FoldAllInactiveRegions", "title": "%c_cpp.command.foldAllInactiveRegions.title%", @@ -6588,6 +6599,10 @@ "command": "C_Cpp.ToggleDimInactiveRegions", "when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/" }, + { + "command": "C_Cpp.ToggleTypeSizeAndAlignment", + "when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/" + }, { "command": "C_Cpp.FoldAllInactiveRegions", "when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/ && config.C_Cpp.codeFolding =~ /^[eE]nabled$/" diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 2d0019cf0..fa9fa84e8 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -19,6 +19,7 @@ "c_cpp.command.enableErrorSquiggles.title": "Enable Error Squiggles", "c_cpp.command.disableErrorSquiggles.title": "Disable Error Squiggles", "c_cpp.command.toggleDimInactiveRegions.title": "Toggle Inactive Region Colorization", + "c_cpp.command.toggleTypeSizeAndAlignment.title": "Toggle Type Size and Alignment in Hovers", "c_cpp.command.foldAllInactiveRegions.title": "Fold All Inactive Regions", "c_cpp.command.unfoldAllInactiveRegions.title": "Unfold All Inactive Regions", "c_cpp.command.resetDatabase.title": "Reset IntelliSense Database", @@ -785,6 +786,12 @@ "Markdown text between `` should not be translated or localized (it represents literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.hoverShowTypeSizeAndAlignment.markdownDescription": { + "message": "Displays the size and alignment of types in IntelliSense hovers. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `default`.", + "comment": [ + "Markdown text between `` should not be translated or localized (it represents literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.vcpkg.enabled.markdownDescription": { "message": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).", "comment": [ diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 176b3a40b..5481bdd8b 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1506,6 +1506,7 @@ export class DefaultClient implements Client { markdownInComments: settings.markdownInComments, hover: settings.hover, hoverShowIntegralValuesInHexadecimal: settings.hoverShowIntegralValuesInHexadecimal, + hoverShowTypeSizeAndAlignment: settings.hoverShowTypeSizeAndAlignment, vcFormatIndentBraces: settings.vcFormatIndentBraces, vcFormatIndentMultiLineRelativeTo: settings.vcFormatIndentMultiLineRelativeTo, vcFormatIndentWithinParentheses: settings.vcFormatIndentWithinParentheses, @@ -1848,10 +1849,6 @@ export class DefaultClient implements Client { public async onDidChangeSettings(_event: vscode.ConfigurationChangeEvent): Promise> { const defaultClient: Client = clients.getDefaultClient(); - if (this === defaultClient) { - // Only send the updated settings information once, as it includes values for all folders. - void this.sendDidChangeSettings().catch(logAndReturn.undefined); - } const changedSettings: Record = this.settingsTracker.getChangedSettings(); await this.ready; diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 6d01647ec..2dd791d48 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -687,9 +687,9 @@ export class CppProperties implements vscode.Disposable { if (!this.propertiesFile) { const settings: CppSettings = new CppSettings(this.rootUri); if (providerId) { - settings.update("default.configurationProvider", providerId); + void settings.update("default.configurationProvider", providerId); } else { - settings.update("default.configurationProvider", undefined); // delete the setting + void settings.update("default.configurationProvider", undefined); // delete the setting } const config: Configuration | undefined = this.CurrentConfiguration; if (config) { diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 653f620e5..266b9266c 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -291,13 +291,23 @@ export function updateLanguageConfigurations(): void { * workspace events */ async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Promise { + let settingsChanged: boolean = false; clients.forEach(client => { if (client instanceof DefaultClient) { if (trackedSections.some(section => event.affectsConfiguration(section, client.RootUri))) { + settingsChanged = true; void client.onDidChangeSettings(event).catch(logAndReturn.undefined); } } }); + if (settingsChanged) { + // Send the updated settings once through the default client because the payload includes all workspace folders. + const defaultClient: Client = clients.getDefaultClient(); + void defaultClient.sendDidChangeSettings().catch(logAndReturn.undefined); + if (event.affectsConfiguration("C_Cpp.hoverShowTypeSizeAndAlignment")) { + defaultClient.getCopilotHoverProvider()?.reset(); + } + } } function onDidChangeTextDocument(event: vscode.TextDocumentChangeEvent): void { @@ -396,6 +406,7 @@ export async function registerCommands(enabled: boolean): Promise { commandDisposables.push(vscode.commands.registerCommand('C_Cpp.EnableErrorSquiggles', enabled ? onEnableSquiggles : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.DisableErrorSquiggles', enabled ? onDisableSquiggles : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ToggleDimInactiveRegions', enabled ? onToggleDimInactiveRegions : onDisabledCommand)); + commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ToggleTypeSizeAndAlignment', enabled ? onToggleTypeSizeAndAlignment : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.FoldAllInactiveRegions', enabled ? onFoldAllInactiveRegions : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.UnfoldAllInactiveRegions', enabled ? onUnfoldAllInactiveRegions : onDisabledCommand)); commandDisposables.push(vscode.commands.registerCommand('C_Cpp.PauseParsing', enabled ? onPauseParsing : onDisabledCommand)); @@ -912,19 +923,25 @@ async function onAddToIncludePath(path: string): Promise { function onEnableSquiggles(): void { // This only applies to the active client. const settings: CppSettings = new CppSettings(clients.ActiveClient.RootUri); - settings.update("errorSquiggles", "enabled"); + void settings.update("errorSquiggles", "enabled"); } function onDisableSquiggles(): void { // This only applies to the active client. const settings: CppSettings = new CppSettings(clients.ActiveClient.RootUri); - settings.update("errorSquiggles", "disabled"); + void settings.update("errorSquiggles", "disabled"); } function onToggleDimInactiveRegions(): void { // This only applies to the active client. const settings: CppSettings = new CppSettings(clients.ActiveClient.RootUri); - settings.update("dimInactiveRegions", !settings.dimInactiveRegions); + void settings.update("dimInactiveRegions", !settings.dimInactiveRegions); +} + +function onToggleTypeSizeAndAlignment(): Thenable { + // This only applies to the active client. + const settings: CppSettings = new CppSettings(clients.ActiveClient.RootUri); + return settings.update("hoverShowTypeSizeAndAlignment", !settings.hoverShowTypeSizeAndAlignment); } function onFoldAllInactiveRegions(): Promise { diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 0214c5e4a..499431d09 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -72,6 +72,7 @@ export interface WorkspaceFolderSettingsParams { clangTidyChecksDisabled: string[] | undefined; hover: string; hoverShowIntegralValuesInHexadecimal: boolean; + hoverShowTypeSizeAndAlignment: boolean; markdownInComments: string; vcFormatIndentBraces: boolean; vcFormatIndentMultiLineRelativeTo: string; @@ -490,6 +491,7 @@ export class CppSettings extends Settings { public get doxygenSectionTags(): string[] { return this.getAsArrayOfStrings("doxygen.sectionTags"); } public get hover(): string { return this.getAsString("hover"); } public get hoverShowIntegralValuesInHexadecimal(): boolean { return this.getAsBoolean("hoverShowIntegralValuesInHexadecimal"); } + public get hoverShowTypeSizeAndAlignment(): boolean { return this.getAsBoolean("hoverShowTypeSizeAndAlignment"); } public get markdownInComments(): string { return this.getAsString("markdownInComments"); } public get legacyCompilerArgsBehavior(): boolean { return this.getAsBoolean("legacyCompilerArgsBehavior"); } public get inlayHintsAutoDeclarationTypes(): boolean { return this.getAsBoolean("inlayHints.autoDeclarationTypes.enabled"); } @@ -777,8 +779,8 @@ export class CppSettings extends Settings { void super.Section.update(name, value?.toLowerCase() === value1.toLowerCase() ? value2 : value1, getTarget()); } - public update(name: string, value: T): void { - void super.Section.update(name, value); + public update(name: string, value: T): Thenable { + return super.Section.update(name, value); } public populateEditorConfig(document: vscode.TextDocument): void { diff --git a/Extension/test/minBinaryVersion.json b/Extension/test/minBinaryVersion.json index 26f354be5..9c4112f6c 100644 --- a/Extension/test/minBinaryVersion.json +++ b/Extension/test/minBinaryVersion.json @@ -1,3 +1,3 @@ { - "minBinaryVersion": "1.35.3" + "minBinaryVersion": "1.35.4" } diff --git a/Extension/test/scenarios/MultirootDeadlockTest/assets/SingleRootProject/quickInfo.cpp b/Extension/test/scenarios/MultirootDeadlockTest/assets/SingleRootProject/quickInfo.cpp index db844e8e5..e03f5792a 100644 --- a/Extension/test/scenarios/MultirootDeadlockTest/assets/SingleRootProject/quickInfo.cpp +++ b/Extension/test/scenarios/MultirootDeadlockTest/assets/SingleRootProject/quickInfo.cpp @@ -35,4 +35,9 @@ int main() myfunction(false); bool result = isEven(1); testDoxygen(2, 3); -} \ No newline at end of file +} + +struct HoverType +{ + int value; +}; \ No newline at end of file diff --git a/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts b/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts index 11a455cba..041956d44 100644 --- a/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts +++ b/Extension/test/scenarios/MultirootDeadlockTest/tests/quickInfo.test.ts @@ -58,6 +58,34 @@ suite("[Quick info test]", function(): void { disposables.forEach(d => d.dispose()); }); + async function getTypeHoverText(): Promise { + const result: vscode.Hover[] = (await vscode.commands.executeCommand( + 'vscode.executeHoverProvider', + fileUri, + new vscode.Position(39, 8))); + assert.ok(result.length > 0, "Expected a hover for HoverType."); + return result.flatMap(hover => hover.contents) + .map(content => typeof content === "string" ? content : content.value) + .join("\n"); + } + + async function waitForTypeHover(showSizeAndAlignment: boolean): Promise { + const deadline: number = Date.now() + 5000; + let hoverText: string = ""; + while (Date.now() < deadline) { + hoverText = await getTypeHoverText(); + const showsSize: boolean = hoverText.includes("**Size:**"); + const showsAlignment: boolean = hoverText.includes("**Alignment:**"); + if (hoverText.includes("struct HoverType") + && showsSize === showSizeAndAlignment + && showsAlignment === showSizeAndAlignment) { + return hoverText; + } + await testHelpers.delay(50); + } + assert.fail(`Timed out waiting for type size and alignment to be ${showSizeAndAlignment ? "shown" : "hidden"}. Last hover:\n${hoverText}`); + } + test("[Hover over function call - normal comment]", async () => { const result: vscode.Hover[] = (await vscode.commands.executeCommand('vscode.executeHoverProvider', fileUri, new vscode.Position(35, 23))); const expected_full_comment: string = `\`\`\`cpp\nbool isEven(int value)\n\`\`\` \nVerifies if input is even number or not`; @@ -111,15 +139,23 @@ suite("[Quick info test]", function(): void { const originalHover: string | undefined = configuration.inspect("hover")?.workspaceFolderValue; const originalShowIntegralValuesInHexadecimal: boolean | undefined = configuration.inspect("hoverShowIntegralValuesInHexadecimal")?.workspaceFolderValue; + const originalShowTypeSizeAndAlignment: boolean | undefined = + configuration.inspect("hoverShowTypeSizeAndAlignment")?.workspaceFolderValue; try { await configuration.update("hover", "disabled", vscode.ConfigurationTarget.WorkspaceFolder); await configuration.update("hoverShowIntegralValuesInHexadecimal", true, vscode.ConfigurationTarget.WorkspaceFolder); + await configuration.update("hoverShowTypeSizeAndAlignment", false, vscode.ConfigurationTarget.WorkspaceFolder); const settings: CppSettings = new CppSettings(fileUri); assert.strictEqual(settings.hover, "disabled"); assert.strictEqual(settings.hoverShowIntegralValuesInHexadecimal, true); + assert.strictEqual(settings.hoverShowTypeSizeAndAlignment, false); } finally { + await configuration.update( + "hoverShowTypeSizeAndAlignment", + originalShowTypeSizeAndAlignment, + vscode.ConfigurationTarget.WorkspaceFolder); await configuration.update( "hoverShowIntegralValuesInHexadecimal", originalShowIntegralValuesInHexadecimal, @@ -128,6 +164,32 @@ suite("[Quick info test]", function(): void { } }); + test("[Toggle type size and alignment command updates hover]", async () => { + const configuration: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", fileUri); + const originalShowTypeSizeAndAlignment: boolean | undefined = + configuration.inspect("hoverShowTypeSizeAndAlignment")?.workspaceFolderValue; + + try { + await configuration.update("hoverShowTypeSizeAndAlignment", true, vscode.ConfigurationTarget.WorkspaceFolder); + await waitForTypeHover(true); + + await vscode.commands.executeCommand("C_Cpp.ToggleTypeSizeAndAlignment"); + assert.strictEqual(configuration.inspect("hoverShowTypeSizeAndAlignment")?.workspaceFolderValue, false); + const hiddenHover: string = await waitForTypeHover(false); + assert.ok(hiddenHover.includes("struct HoverType")); + + await vscode.commands.executeCommand("C_Cpp.ToggleTypeSizeAndAlignment"); + assert.strictEqual(configuration.inspect("hoverShowTypeSizeAndAlignment")?.workspaceFolderValue, true); + const shownHover: string = await waitForTypeHover(true); + assert.ok(shownHover.includes("struct HoverType")); + } finally { + await configuration.update( + "hoverShowTypeSizeAndAlignment", + originalShowTypeSizeAndAlignment, + vscode.ConfigurationTarget.WorkspaceFolder); + } + }); + test("[Folder hexadecimal setting preserves global disabled hover]", async () => { const configuration: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", fileUri); const originalGlobalHover: string | undefined = configuration.inspect("hover")?.globalValue; From eb981644369c99d39054578a769af572c24bd1eb Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 13 Oct 2026 18:05:18 -0700 Subject: [PATCH 9/9] Update changelog for 1.35.4 pre-release (#14833) --- Extension/CHANGELOG.md | 26 ++++++++++++++++++++++++++ Extension/package.json | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index b8c8b62db..49ccb8bdb 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,31 @@ # C/C++ for Visual Studio Code Changelog +## Version 1.35.4: October 14, 2026 +### New Features +* Add the opt-in `C_Cpp.hoverShowIntegralValuesInHexadecimal` setting to display integral constants in hexadecimal in IntelliSense hovers. [#7281](https://github.com/microsoft/vscode-cpptools/issues/7281) +* Add the opt-in `C_Cpp.codeAnalysis.clangTidy.includeCleanerMappings` setting to map `misc-include-cleaner` symbols to public headers. [PR #14788](https://github.com/microsoft/vscode-cpptools/pull/14788) +* Dim unused `#include` directives when `editor.showUnused` is enabled, respecting per-file Include Cleanup preferences from `.editorconfig` files. [PR #14808](https://github.com/microsoft/vscode-cpptools/pull/14808) + +### Enhancements +* Add the `C_Cpp.hoverShowTypeSizeAndAlignment` setting and 'Toggle Type Size and Alignment in Hovers' command to hide or show type size and alignment in IntelliSense hovers. [#14820](https://github.com/microsoft/vscode-cpptools/issues/14820) +* Improve IntelliSense responsiveness in multi-root workspaces that use independent `compile_commands.json` databases. +* Improve processing performance for long multiline documentation comments. + +### Bug Fixes +* Fix incorrect IntelliSense constructibility results and diagnostics for inherited constructors with unusable base constructors or destructors and abstract classes with virtual bases. +* Fix IntelliSense crashes involving precompiled headers, `constexpr` evaluation, C++20 `requires` expressions, SFINAE, and incomplete nested class declarations. +* Fix false IntelliSense errors for nested C++20 `requires` expressions and fold-expression constraints in MSVC module templates. +* Fix stale IntelliSense diagnostics and inconsistent document snapshots during concurrent edits and requests. +* Fix tag parsing of user-defined literal operator suffixes when macro expansion is involved. +* Fix completion for declarations imported from standard-library modules when using MSVC. +* Fix 'Create Declaration/Definition' matching for functions in the global namespace. +* Fix IntelliSense lookup for scoped enumerations defined inside class templates. +* Fix inconsistent fuzzy completion matching caused by reused candidate buffers. +* Fix IntelliSense language-standard detection for MSVC `/std:c++23`. +* Fix a potential data race in include-path resolution. +* Various localization updates. +* Update dependencies. + ## Version 1.35.3: October 2, 2026 ### New Features * Add 'Fold All Inactive Regions' and 'Unfold All Inactive Regions' commands and the opt-in `C_Cpp.autoFoldInactiveRegions` setting. [#8992](https://github.com/microsoft/vscode-cpptools/issues/8992) diff --git a/Extension/package.json b/Extension/package.json index 29a55638d..3f92b7240 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "1.35.3-main", + "version": "1.35.4-main", "publisher": "ms-vscode", "icon": "LanguageCCPP_color_128x.png", "readme": "README.md",