microsoft / microsoft/vscode-cpptools
code editing: correctly underlined but incorrectly explained out-of-class specifier
@browntarik is already working on this.
Since Sep 13, 2023.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: Ubuntu 20.04.1
- VS Code Version: 1.81.1
- C/C++ Extension Version: 1.17.5
- If using SSH remote, specify OS of remote machine: (not using)
Bug Summary and Steps to Reproduce
Bug Summary: incorrectly described specifier problem
Steps to reproduce:
- Write a function with a specifier that is only allowed inside class definition
- The specifier should be underlined by cpp language tools
- Observe the error.
Expected behavior: The error message should be "invalid specifier outside a class definition"
Reason: class (forward) declarations can not have specifiers inside/outside as they have no scope and don't use {}. Such specifiers can appear only inside class definition.
Configuration and Logs
Only partial info to omit confidential information (also I don't think anything else is relevant)
-------- Diagnostics - 9/13/2023, 11:05:50 AM
Version: 1.17.5
Current Configuration:
{
"name": "Linux",
"includePath": [
[...]
],
"defines": [],
"compilerPath": "/usr/bin/clang-12",
"intelliSenseMode": "linux-clang-x64",
"compilerPathInCppPropertiesJson": "/usr/bin/clang-12",
"cStandard": "gnu11",
"cppStandard": "gnu++17",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"mergeConfigurations": false,
"compilerPathIsExplicit": false,
Other Extensions
No response
Additional context
Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:18:39.991Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.15.0-82-generic snap
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.