Menu

Empty .ctu-info file

2022-10-08
2022-10-11
  • Charles-the-intern

    Hi,
    I’m an intern looking into how to write custom checks with cppcheck, and I was playing around and got .ctu-info files generated but they were all empty. My question is: what is the implication of an empty .ctu-info file, i.e. will it affect checks that require ctu information? Let’s say I want to write a check to see if a class is derived from another certain class, that would surely require some sort of ctu information, but these empty .ctu-info files got me nervous…

    Thanks very much.

     

    Last edit: Charles-the-intern 2022-10-08
    • Charles-the-intern

      I took a look at the source code cppcheck.cpp and nothing is written out to the .ctu-info files actually

       
  • Daniel Marjamäki

    Sorry for late reply.

    Cppcheck generates an empty .ctu-info file. And then the addon can add arbitrary information in that.

    In your case.. it does not sound like you need CTU analysis. Can you show some simple small code example?

     
    • Charles-the-intern

      Thanks for the reply, I've figured it out actually with my custom check against a simple hello world example. As long as you have a compile command database or VS .vcxproj it should work fine.

       

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.