Menu

internalAstErrors due to recent commits

Martin
2020-12-01
2020-12-03
  • Martin

    Martin - 2020-12-01

    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

     
  • Daniel Marjamäki

    Spontaneously I guess this is because we keep that template now.. so it's not a "regression" we are getting better and better..

     
  • Robert Reif

    Robert Reif - 2020-12-01

    I see the problem in ex2.cpp and I will try to fix it. Member initialization in the constructor doesn't support {}.

     
    👍
    1
    • Robert Reif

      Robert Reif - 2020-12-01

      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.

       
      • Robert Reif

        Robert Reif - 2020-12-02

        ex1.cpp should also be fixed now .

         
        • Robert Reif

          Robert Reif - 2020-12-03

          This also fixes the daca crash in catch2.

           

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.