I've recently updated my local cppcheck to the latest main branch:
old commit: ab3614b4e2ce42d22d4714c5ea4908f06b46fa01
new commit: 018d033af353ae922b3683d1854f785a010866f6
Now the following issues occur (files are attached):
ok thanks! I wrote "more examples might be found in the forum." in the ticket. it's hard to know which ones of these have the same root cause and which ones are distinct. if we fix one problem we can close the ticket and create a new ticket for the remaining cases that do not work..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've recently updated my local cppcheck to the latest main branch:
old commit: ab3614b4e2ce42d22d4714c5ea4908f06b46fa01
new commit: 018d033af353ae922b3683d1854f785a010866f6
Now the following issues occur (files are attached):
./cppcheck /home/user/Desktop/ex1.cpp
Checking /home/user/Desktop/ex1.cpp ...
/home/user/Desktop/ex1.cpp:5:10: error: Internal error. Token::astOperand1() cyclic dependency. [cppcheckError]
{"type", std::string{"Id_t"}},
^
./cppcheck /home/user/Desktop/ex2.cpp
Checking /home/user/Desktop/ex2.cpp ...
/home/user/Desktop/ex2.cpp:2:7: error: Internal error. Token::astOperand1() cyclic dependency. [cppcheckError]
{{ {{}, {} }, {id_82, ids_84_86_88}, {{}, {} }, {id_80, id_88} }},
^
./cppcheck /home/user/Desktop/ex3.cpp
Checking /home/user/Desktop/ex3.cpp ...
/home/user/Desktop/ex3.cpp:5:10: error: Internal error. Token::astOperand1() cyclic dependency. [cppcheckError]
{DatabaseLayer::DatabaseLayerVector{
^
./cppcheck /home/user/Desktop/ex4.cpp
Checking /home/user/Desktop/ex4.cpp ...
/home/user/Desktop/ex4.cpp:4:7: error: Internal error. Token::astOperand1() cyclic dependency. [cppcheckError]
{
^
Could you please check?
Best regards,
Martin
Thanks! I can reproduce. I created https://trac.cppcheck.net/ticket/10078
I think the same issue can be found in the following example (file attached):
./cppcheck /home/user/Desktop/ex2_2.cpp
Checking /home/user/Desktop/ex2_2.cpp ...
/home/user/Desktop/ex2_2.cpp:3:10: error: Internal error. Token::astOperand1() cyclic dependency. [cppcheckError]
{{rg,
^
ok thanks! I wrote "more examples might be found in the forum." in the ticket. it's hard to know which ones of these have the same root cause and which ones are distinct. if we fix one problem we can close the ticket and create a new ticket for the remaining cases that do not work..
I have closed the ticket. Feel free to try it out..
It's fixed now, thanks.