[PATCH] cpp11-migrate: Add command line option to enables transforms automatically

Edwin Vane edwin.vane at intel.com
Wed Jul 17 13:31:12 PDT 2013


  For command-line switch I suggest `-supports`.

  You did a fair bit of refactoring moving `registerTransform()` etc out of Transforms.h. There is actually a very good reason for why that stuff is there. Right now, your change introduces a link dependency between MigrateCore and all the transforms which will one day each be their own library. But even in the migrator's current state, this change will fail to link with the autoconf build system in some configurations. So please change this back. That is, code in `tool/` should be responsible for registering transforms and not code in `Core/`. I suggest exposing the `Version` structure in `Transform.h` and having code for each transform be responsible for specifying which versions it works with. This info can be queried using static member functions and provided during the register call or perhaps the transform creator callback can provide it at construction time. With the latter option, you'll end up creating transforms but never calling them though.

  I think transform-specific code should be as limited as possible to the transform subdirectories.

http://llvm-reviews.chandlerc.com/D1154

BRANCH
  target-cmd

ARCANIST PROJECT
  clang-tools-extra



More information about the cfe-commits mailing list