Closed EduMenges closed 12 months ago
@EduMenges
The following errors are from Clang-Tidy (the executable c:\Users\br20279\.vscode\extensions\ms-vscode.cpptools-1.16.3-win32-x64/bin/../LLVM/bin/clang-tidy.exe
seen from the logs that the extension uses for "linter" tool) which may have limitations when supporting some code that are specific to compilers other than Clang, such as MSVC for this example.
Errors from Clang-Tidy and not the extension's IntelliSense.
declaration of anonymous struct must be a definition C/C++(clang-diagnostic-error)
declaration does not declare anything C/C++(clang-diagnostic-missing-declarations)
The extension has code analysis settings (see C_Cpp.codeAnalysis.clangTidy*
) to configure Clang-Tidy. Some of the settings include disabling some Clang-Tidy checks or directly passing args to the Clang-Tidy executable to further configure Clang-Tidy.
If Clang-Tidy is not supposed to show errors for the sample code, then Clang-Tidy may have a bug for checking code specific to MSVC.
This issue has been closed because the described behavior was determined to be by design.
Environment
Bug Summary and Steps to Reproduce
Bug Summary: When applying a pragma in a struct definition, the extension gives the following error:
declaration of anonymous struct must be a definition C/C++(clang-diagnostic-error) declaration does not declare anything C/C++(clang-diagnostic-missing-declarations)
Steps to reproduce:
Expected behavior: The extension should apply the pragma correctly.
Configuration and Logs
Other Extensions
No response
Additional context
The complete code for testing is