Menu

Many "Token::astOperand1() cyclic dependency" due to recent commits

Martin
2021-01-05
2021-05-06
  • Martin

    Martin - 2021-01-05

    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

     
  • Daniel Marjamäki

    Thanks! I can reproduce. I created https://trac.cppcheck.net/ticket/10078

     
  • Martin

    Martin - 2021-01-19

    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,
    ^

     
  • Daniel Marjamäki

    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..

     
  • Daniel Marjamäki

    I have closed the ticket. Feel free to try it out..

     
  • Martin

    Martin - 2021-05-06

    It's fixed now, thanks.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.