microsoft / microsoft/vscode-cpptools

code editing: correctly underlined but incorrectly explained out-of-class specifier

Aperta
#11,433 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@browntarik ci sta già lavorando.

Dal 13/9/2023.

enhancement Language Service Visual Studio
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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:

  1. Write a function with a specifier that is only allowed inside class definition
  2. The specifier should be underlined by cpp language tools
  3. Observe the error.

image

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.