(I think) at some points between commit
old: e8c1c792a51e7232b3912c536bf7ac86e7f77faf
new: 8a1c16a56036d88c9b173d2ead5abfb718947719
some code was changed that lead to the following, new internalAstError issues while analyzing our existing codebase:
Here is a pull request that fixes the InternalAstError for ex2.cpp by instantiating nested templates in the proper order. The inner template is not instantiated yet.
ex1.cpp is a different problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
(I think) at some points between commit
old: e8c1c792a51e7232b3912c536bf7ac86e7f77faf
new: 8a1c16a56036d88c9b173d2ead5abfb718947719
some code was changed that lead to the following, new internalAstError issues while analyzing our existing codebase:
./cppcheck --enable=all --inconclusive /home/user/Desktop/ex2.cpp
Checking /home/user/Desktop/ex2.cpp ...
/home/user/Desktop/ex2.hpp:4:29: error: AST broken: endless recursion from ':' [internalAstError]
adapter(Args&&... args) : T{ std::forward<args>(args)... } {}</args>
./cppcheck /home/user/Desktop/ex1.cpp
Checking /home/user/Desktop/ex1.cpp ...
/home/user/Desktop/ex1.cpp:2:1: error: AST broken: endless recursion from 'CountryCode < 3 >' [internalAstError]
Could you please check?
CountryCode<n>::CountryCode(std::string cc) : m_String{std::move(cc)}</n>
The files are attached.
Could you please check?
Best regards,
Martin
Spontaneously I guess this is because we keep that template now.. so it's not a "regression" we are getting better and better..
I see the problem in ex2.cpp and I will try to fix it. Member initialization in the constructor doesn't support {}.
Here is a pull request that fixes the InternalAstError for ex2.cpp by instantiating nested templates in the proper order. The inner template is not instantiated yet.
ex1.cpp is a different problem.
ex1.cpp should also be fixed now .
This also fixes the daca crash in catch2.