[PATCH] Transform all files in a compilation database if no source files are provided.

Edwin Vane edwin.vane at intel.com
Tue Aug 27 06:53:48 PDT 2013


  Main problem I see here is that if you don't explicitly include a directory, no files get transformed. We should by default transform every file in the compilation database. Since you're using the `IncludingExcludeInfo` structure to identify modifiable sources and headers (which is fine I think) it gets a bit tricky to identify headers we can transform. So here's my suggestion: If no include/exclude paths are provided, we go through the whole compilation database and add every path to the include list. We should do this in all situations: fixed compilation database, `-p` provided, or compilation database detected from the first file name. You can still populate the list of sources to transform the same way but to work better with `IncludeExcludeInfo` I think we need to prime the structure with info based on source paths.

  If the user provides explicit include/exclude info, we shouldn't prime the structure.

  This will help the lazy typer situation too: If you say

    cpp11-migrate myfile.cpp

  And `myfile.cpp` uses `myfile.h` in the same directory then `myfile.h` will get transformed too.

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



More information about the cfe-commits mailing list