I think that is good question that deserves a good answer.
I have spent a significant amount of effort on clang import already and my feeling is that we are somewhat close to having basic C support. However C++ is very far from working. It will require more work than I expected to get that working. I fear that years of development will be needed. And then more work will be needed if we want that it stays updated with latest C++ and Clang developments.
I have a plan for a new clang import with a different more lightweight approach. It will combine the cppcheck parser and clang import. In theory it would be better to import the Clang AST. In practice.. it's important that it's a lightweight approach.
However in the short term my goal is to focus on the builtin Cppcheck parser. I want that it supports C++20 as soon as possible and that new C++23 features will also be supported to some extent. The combined approach means that the builtin parser must handle all features well.
After that I feel I can look at implementing a new clang import. I hope I will have something useful to share in the autumn/winter that will work for C++ code also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well.. I guess we can keep the old clang import for a little while... at least until I start developing the new clang import and see how well that will work. I will revert my change.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why remove the experimental feature? https://github.com/danmar/cppcheck/commit/207361b174102f38909aec9a996b944ecb370464
I think that is good question that deserves a good answer.
I have spent a significant amount of effort on clang import already and my feeling is that we are somewhat close to having basic C support. However C++ is very far from working. It will require more work than I expected to get that working. I fear that years of development will be needed. And then more work will be needed if we want that it stays updated with latest C++ and Clang developments.
I have a plan for a new clang import with a different more lightweight approach. It will combine the cppcheck parser and clang import. In theory it would be better to import the Clang AST. In practice.. it's important that it's a lightweight approach.
However in the short term my goal is to focus on the builtin Cppcheck parser. I want that it supports C++20 as soon as possible and that new C++23 features will also be supported to some extent. The combined approach means that the builtin parser must handle all features well.
After that I feel I can look at implementing a new clang import. I hope I will have something useful to share in the autumn/winter that will work for C++ code also.
well.. I guess we can keep the old clang import for a little while... at least until I start developing the new clang import and see how well that will work. I will revert my change.