Announcement

Collapse
No announcement yet.

Clang's C++ Modernizer Is Becoming More Useful

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clang's C++ Modernizer Is Becoming More Useful

    Phoronix: Clang's C++ Modernizer Is Becoming More Useful

    Last year Intel proposed a tool to auto-convert C++ code into C++11 compliant code. The last time I wrote about this automatic code migrator it was called the C++11 Migrator and was still making steady progress, but that was months ago. Today we have an update on this useful utility now known as the C++ Modernizer and can auto-convert large amounts of code...

    http://www.phoronix.com/vr.php?view=MTUxODM

  • #2
    Really great to clean up old code, legacy code bases, unmaintained stuff, and such..

    Fix bit rot...

    Comment


    • #3
      You won't see this used for legacy programs; no one wants to go back and retest everything when its been known working for decades.

      Comment


      • #4
        Nice idea, limited benefit so far.

        One of the biggest problems that I have with the clang-modernizer and a number of other LLVM based tools is that they are highly oriented, if not dependent, on a cmake based build system. For a codebase that is only a few file, no biggie. For a large, complex codebase with various internal libraries and executables, if you use another build system -- like SCons -- you are screwed.

        -p <build-path> is used to read a compile command database.

        For example, it can be a CMake build directory in which a file named
        compile_commands.json exists (use -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
        CMake option to get this output). When no build path is specified,
        a search for compile_commands.json will be attempted through all
        parent paths of the first input file . See:
        http://clang.llvm.org/docs/HowToSetu...ngForLLVM.html for an
        example of setting up Clang Tooling on a source tree.
        I've searched and asked on various IRC channels, and there does not seem to be any clear way to create a "compile command database" from SCons or other build systems. Please, let me know that I'm wrong.

        Comment

        Working...
        X