microsoft / microsoft/vscode-cpptools
Using dot '.' as member access operator fails to trigger auto completion/intellisense when used inside macro.
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Environment
- OS and Version: Windows 10
- VS Code Version: 1.108.2
- C/C++ Extension Version: 1.32.2
- If using SSH remote, specify OS of remote machine: none
Bug Summary and Steps to Reproduce
Bug Summary:
There is a feature that allows to type '.' as access member operator on any type to show completion window with all members and then it resolves to '.' or '->' automatically.
This feature fails when used inside macro call.
Steps to reproduce:
- Paste code (file.hpp):
#define myMacro(value)
struct MyStruct
{
int value;
};
struct Container
{
int value2;
MyStruct *myStruct;
};
void func(Container *container)
{
myMacro(container. // <- problem here
}
- Go to 'func' function and type in 'myMacro(container'
- Now when we type access member operator '.' normally popup with suggestions should appear - but it doesn't.
- Instead of '.' type '->' - suggestions appear.
Expected behavior:
After typing '.' in macro call we should see suggestions with struct members just like after typing '->'.
'Trigger Suggest' command (CTRL+SPACE) doesn't work on '.' but works after '->' when used in macro call.
Configuration and Logs
ask for more details
Other Extensions
No response
Additional context
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre il problema in file.hpp usando VS Code 1.108.2 e l’estensione C/C++ 1.32.2, iniziando dalla chiamata alla macro in func e confrontando '.' con '->'. Tracciare il comportamento del completamento per l’accesso ai membri all’interno degli argomenti della macro; l’attività è completata quando '.' apre gli stessi suggerimenti per i membri di '->', anche quando viene invocato Trigger Suggest.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp, typescript, vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 68/100