You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
constructor function attribute takes arguments - but IntelliSense marks as error. #4503
C/C++ Extension Version: Version 0.26.0: October 15, 2019
Other extensions you installed (and if the issue persists after disabling them): N/A
A clear and concise description of what the bug is.
The constructor function attribute takes an optional priority field. This is incorrectly flagged as an error by IntelliSense with the following error: attribute "constructor" does not take arguments.
To Reproduce
Open file with the following function declaration. Watch IntelliSense mark it as a problem with the above error.
I have also run into this issue. I went to upvote the linked bug above, but when I went to sign up, I couldn't unsubscribe from the VS promotional materials. Looked like there might have been an invisible check mark. Running Chrome 85. I didn't want to sign up and receive promotional material.
For some reason it didn't ask me when I signed up today, so I sent an upvote to the upstream issue. I am working in a codebase close to the Linux kernel, so there is a lot of interest to me in seeing more of these attribute issues fixed up although the amount of people who would appreciate the fixes is probably close to 0. Thanks for the upstream report :)
Tristan Partin (@tristan957) 1.0.0 should be released Monday...should be identical to 0.30.0-insiders5 except for the version changes. diag_suppress should work with 0.29.0 and older as well, but you'd need to know the internal/unreported error code to use.
The issue we opened against Visual Studio was closed as "lower priority" so unfortunately that means we won't likely be getting a fix for it in VS Code either.
Activity
sean-mcmanus commentedon Oct 28, 2019
Thanks for reporting this. I've filed a bug on VS at https://developercommunity.visualstudio.com/content/problem/796872/cc-intellisense-in-gccclang-mode-shows-attribute-c.html .
tristan957 commentedon Sep 9, 2020
I have also run into this issue. I went to upvote the linked bug above, but when I went to sign up, I couldn't unsubscribe from the VS promotional materials. Looked like there might have been an invisible check mark. Running Chrome 85. I didn't want to sign up and receive promotional material.
sean-mcmanus commentedon Sep 9, 2020
Tristan Partin (@tristan957) I'm not familiar with the VS promotional materials you're describing, but you could file a complaint at https://developercommunity.visualstudio.com/ , and/or add an email filter.
tristan957 commentedon Sep 10, 2020
For some reason it didn't ask me when I signed up today, so I sent an upvote to the upstream issue. I am working in a codebase close to the Linux kernel, so there is a lot of interest to me in seeing more of these attribute issues fixed up although the amount of people who would appreciate the fixes is probably close to 0. Thanks for the upstream report :)
sean-mcmanus commentedon Sep 11, 2020
Using
in the TU is a potential workaround (i.e. it could be added to a forcedInclude file in your configuration).
https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders5 has IntelliSense error codes added.
tristan957 commentedon Sep 11, 2020
Sweet. I will be looking at that when it hits stable :). Should help tremendously in certain parts of the code.
sean-mcmanus commentedon Sep 11, 2020
Tristan Partin (@tristan957) 1.0.0 should be released Monday...should be identical to 0.30.0-insiders5 except for the version changes. diag_suppress should work with 0.29.0 and older as well, but you'd need to know the internal/unreported error code to use.
brvtalcake commentedon Feb 7, 2023
I also went through the same issue but yeah, doing something like
this
is probably the best way to disable any false positives atm I guess
bobbrow commentedon Dec 18, 2024
The issue we opened against Visual Studio was closed as "lower priority" so unfortunately that means we won't likely be getting a fix for it in VS Code either.