Results 1 to 4 of 4

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

  1. #1
    Join Date
    Jan 2007
    Posts
    15,115

    Default 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. #2
    Join Date
    Dec 2011
    Posts
    2,103

    Default

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

    Fix bit rot...

  3. #3
    Join Date
    Jun 2012
    Posts
    357

    Default

    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.

  4. #4
    Join Date
    Jul 2013
    Location
    Weed, CA, US [It's as bad as it sounds.]
    Posts
    35

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •