Skip to content

Commit ef04f02

Browse files
Merge pull request #11366 from microsoft/dev/mimatias/r-17-5
1.17.5 merge
2 parents 28d5715 + 1efac27 commit ef04f02

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

Extension/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# C/C++ for Visual Studio Code Changelog
22

3+
## Version 1.17.5: August 28, 2023
4+
### Bug Fixes
5+
* Fix a language server crash for platforms that don't support the IntelliSense cache (AutoPCH). [#10789](https://github.com/microsoft/vscode-cpptools/issues/10789)
6+
* Fix markdown in comments when inline/block code is used. [#11322](https://github.com/microsoft/vscode-cpptools/issues/11322)
7+
* Fix Find All References and Call Hierarchy for C files when the cursor is at the end of a symbol. [#11338](https://github.com/microsoft/vscode-cpptools/issues/11338)
8+
* Fix usage of the `/Zc:alignedNew-` MSVC compiler option. [#11350](https://github.com/microsoft/vscode-cpptools/issues/11350)
9+
310
## Version 1.17.4: August 21, 2023
411
### Bug Fixes
512
* Fix crash recovery for the main extension process. [#11335](https://github.com/microsoft/vscode-cpptools/issues/11335)

Extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cpptools",
33
"displayName": "C/C++",
44
"description": "C/C++ IntelliSense, debugging, and code browsing.",
5-
"version": "1.17.4-main",
5+
"version": "1.17.5-main",
66
"publisher": "ms-vscode",
77
"icon": "LanguageCCPP_color_128x.png",
88
"readme": "README.md",

Extension/src/LanguageServer/Providers/findAllReferencesProvider.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import * as vscode from 'vscode';
66
import { Position, RequestType } from 'vscode-languageclient';
77
import { DefaultClient, workspaceReferences } from '../client';
8-
import { CancellationSender, ReferenceInfo, ReferencesParams, ReferencesResult, ReferenceType } from '../references';
8+
import { CancellationSender, ReferenceInfo, ReferenceType, ReferencesParams, ReferencesResult } from '../references';
99

1010
const FindAllReferencesRequest: RequestType<ReferencesParams, ReferencesResult, void> =
1111
new RequestType<ReferencesParams, ReferencesResult, void>('cpptools/findAllReferences');
@@ -37,7 +37,6 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider {
3737
const response: ReferencesResult = await this.client.languageClient.sendRequest(FindAllReferencesRequest, params, cancelSource.token);
3838

3939
// Reset anything that can be cleared before processing the result.
40-
// Note: ReferencesManager.resetReferences is called in ReferencesManager.showResultsInPanelView
4140
workspaceReferences.resetProgressBar();
4241
cancellationTokenListener.dispose();
4342
requestCanceledListener.dispose();
@@ -48,8 +47,9 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider {
4847
// "Cannot destructure property 'range' of 'e.location' as it is undefined."
4948
// TODO: per issue https://github.com/microsoft/vscode/issues/169698
5049
// vscode.CancellationError is expected, so when VS Code fixes the error use vscode.CancellationError again.
50+
workspaceReferences.resetReferences();
5151
return undefined;
52-
} else if (response.referenceInfos.length !== 0) {
52+
} else if (response.referenceInfos.length > 0) {
5353
response.referenceInfos.forEach((referenceInfo: ReferenceInfo) => {
5454
if (referenceInfo.type === ReferenceType.Confirmed) {
5555
const uri: vscode.Uri = vscode.Uri.file(referenceInfo.file);
@@ -60,7 +60,10 @@ export class FindAllReferencesProvider implements vscode.ReferenceProvider {
6060
});
6161

6262
// Display other reference types in panel or channel view.
63+
// Note: ReferencesManager.resetReferences is called in ReferencesManager.showResultsInPanelView
6364
workspaceReferences.showResultsInPanelView(response);
65+
} else {
66+
workspaceReferences.resetReferences();
6467
}
6568

6669
return locationsResult;

Extension/src/LanguageServer/client.ts

+18-4
Original file line numberDiff line numberDiff line change
@@ -1597,13 +1597,27 @@ export class DefaultClient implements Client {
15971597
debug: { command: serverModule, args: [serverName], options: { detached: true } }
15981598
};
15991599

1600+
// The IntelliSense process should automatically detect when AutoPCH is
1601+
// not supportable (on platforms that don't support disabling ASLR/PIE).
1602+
// We've had reports of issues on arm64 macOS that are addressed by
1603+
// disabling the IntelliSense cache, suggesting fallback does not
1604+
// always work as expected. It's actually more efficient to disable
1605+
// the cache on platforms we know do not support it. We do that here.
16001606
let intelliSenseCacheDisabled: boolean = false;
16011607
if (os.platform() === "darwin") {
1602-
const releaseParts: string[] = os.release().split(".");
1603-
if (releaseParts.length >= 1) {
1604-
// AutoPCH doesn't work for older Mac OS's.
1605-
intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17;
1608+
// AutoPCH doesn't work for arm64 macOS.
1609+
if (os.arch() === "arm64") {
1610+
intelliSenseCacheDisabled = true;
1611+
} else {
1612+
// AutoPCH doesn't work for older x64 macOS's.
1613+
const releaseParts: string[] = os.release().split(".");
1614+
if (releaseParts.length >= 1) {
1615+
intelliSenseCacheDisabled = parseInt(releaseParts[0]) < 17;
1616+
}
16061617
}
1618+
} else {
1619+
// AutoPCH doesn't work for arm64 Windows.
1620+
intelliSenseCacheDisabled = os.platform() === "win32" && os.arch() === "arm64";
16071621
}
16081622

16091623
const localizedStrings: string[] = [];

0 commit comments

Comments
 (0)