++++++++++++++++++++++++++++++++++++++++++++++
UPDATE: There is a clangd VS Code Plugin That works well.
++++++++++++++++++++++++++++++++++++++++++++++
The Clang-Tidy plugin is not being maintained: https://github.com/notskm/vscode-clang-tidy/issues/45
The developer has officially put it on indefinite hiatus.
Also note: You need clang-tidy installed on your system. I did this on my Ubuntu OS using the package manager. sudo apt-get update -y && sudo apt-get install -y clang-tidy.
if you're an exceptionally attractive individual like me, the only things preventing you from retiring clion and adopting vscode (for everything) are clang-tidy and cppcheck. we can get clang-tidy by upvoting this feature request for adding clang-tidy support to the cpp extension for vscode: https://github.com/microsoft/vscode-cpptools/issues/2908
clang-tidy good. more clang-tidy.
Edit: After pasting C++23 everywhere i could even think about I finaly got it running through editing `.code-workspace` with:
"C_Cpp.codeAnalysis.clangTidy.enabled": true, "C_Cpp.codeAnalysis.clangTidy.path": "C:\\msys64\\ucrt64\\bin\\clang-tidy.exe", "C_Cpp.codeAnalysis.clangTidy.args": [ "-std=c++23" ]
###
I tried switching up my workspace to C++23 (from C++17) but I run into constant erros by clang-tidy. I use g++ 14.2.0 as compiler so by my understanding there should be c++23 support. Any help appreciated. I'm quite new with C++ (or compiler languages in general) so i excuse for a lack of understanding on my side.
Errors densed down for readability. (clang etc in the comments)
[{
"owner": "clang-tidy",
"code": "clang-diagnostic-error",
"relatedInformation": [
{
"message": "use of undeclared identifier '_Float32'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/bits/cpp_type_traits.h"
},
{
"message": "use of undeclared identifier '_Float64'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/bits/cpp_type_traits.h"
},
{
"message": "use of undeclared identifier '_Float128'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/bits/cpp_type_traits.h"
},
{
"message": "no member named '__bfloat16_t' in namespace '__gnu_cxx'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/bits/cpp_type_traits.h"
},
{
"message": "invalid suffix 'bf16' on floating constant",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/compare"
},
{
"message": "use of undeclared identifier '_Float32'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/ext/type_traits.h"
},
{
"message": "use of undeclared identifier '_Float64'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/ext/type_traits.h"
},
{
"message": "use of undeclared identifier '_Float128'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/ext/type_traits.h"
},
{
"message": "no member named '__bfloat16_t' in namespace '__gnu_cxx'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/ext/type_traits.h"
},
{
"message": "unknown type name '_Float32'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/numbers"
},
{
"message": "use of undeclared identifier '_Float32'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/numbers"
},
{
"message": "use of undeclared identifier '_Float32'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/type_traits"
},
{
"message": "use of undeclared identifier '_Float64'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/type_traits"
},
{
"message": "use of undeclared identifier '_Float128'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/type_traits"
},
{
"message": "no member named '__bfloat16_t' in namespace '__gnu_cxx'",
"resource": "/c:/msys64/ucrt64/include/c++/14.2.0/type_traits"
}
]
}]Hello,
I am working through various complaints from clang-tidy, clang and cppcheck. I have a couple questions with a Vulkan CMake project . I am having a bit of time setting everything properly. Note everything builds with Cmake.
-
with Clang-tidy I know of the .clang-tidy file in project root directory. But I am not understanding how to let clang-tidy know of the Include paths. It is finding the Vulkan header files though I at this point I am not certain how. However it is not finding GLFW/glfw3.h header files. I am at a loss of how to proceed. CoPilot mentions compile_commands.json but creating one has not solved my problem.
-
flylint has a number of settings including for includePaths. The questions will clang and cppcheck inherit the includePaths setting from the flylint.includePaths variable or do I have to set those all separately . Of course this course if inheritance should apply to a number of other flylint variables.
Thanks,
Frank