vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Usage of "struct foo* f;" in C incorrectly generates a declaration for "foo"

Open sean-mcmanus opened this issue 4 years ago • 2 comments

Use

typedef struct foo
{
	struct foo* f;
} foo;

The Outline view incorrectly shows "foo::foo" being a declaration.

This bug has existed in VS for a long time, so it's probably too low priority for them to fix.

https://developercommunity.visualstudio.com/content/problem/759968/usage-of-struct-foo-f-in-c-incorrectly-generates-a.html

sean-mcmanus avatar Oct 03 '19 20:10 sean-mcmanus

clangd doesn't have this issue, why you still can't fix this?

llvm-vs-code-extensions.vscode-clangd llvm-vs-code-extensions vscode-clangd

ms-vscode.cpptools ms-vscode cpptools

lijh8 avatar Jul 21 '22 15:07 lijh8

@ljhm We're considering adding a setting to enabling tag parsing in C mode, which would fix this: https://github.com/microsoft/vscode-cpptools/issues/9570

sean-mcmanus avatar Jul 21 '22 21:07 sean-mcmanus