-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struct members with a name that starts with a variable type get mis-categorized. #265
Comments
Thanks @matter123 @alexr00 the bounds were messed up so it was messed up for all the keywords, thankfully the one change fixes all of them. @LeandreBl the initial fix has been push in |
The bad news is @matter123 I just realized struct A {
int size_t = 10;
};
int main(int argc, char *argv[])
{
A a{10};
cout << a.size_t << "\n";
return 0;
} I'm not sure if this is in accordance with the language spec, and I'm not sure which types it applies to. Whatever types it does apply to, I'd say initially lets assume its a type unless it's preceded with a member access operator, meaning it would still be marked incorrectly inside of the struct. We'll have to wait till after variable declares/definitions are working before fixing it inside of structs. |
The C11 standard in 7.1.3/1.4 (N1570) explicitly says that any symbols with external linkage (rather than static linkage) are reserved. The definition of the header |
Ah okay excellent. Your knowledge of the standard is impeccable as usual 👍 |
C++ has a similar requirement in [extern.names]/3
|
From @LeandreBl here microsoft/vscode#76165
The problem does not occur when the file is tagged as a C++ file, only in C
Steps to Reproduce:
The
im_a_struct.im_a_member
line gets additional scopes (variable.other.object.access.c
forim_a_struct
andvariable.other.member.c
forim_a_member
) but the lines below it just havemeta.block.c
.The text was updated successfully, but these errors were encountered: