[PATCH] D36686: [clang-diff] Add option to compare files across git revisions
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 15 00:07:38 PDT 2017
arphaman added a comment.
That would be nice. Temporary checkouts are a way to solve the problem. But they might not work for all projects, like when some translation unit includes a file that's not in git using a relative path.
Another solution is to use virtual file systems. A custom vfs could load the files that are in a particular git revision. Then, an overlay fs can be used to combine both the git vfs and the real fs. That overlay should be somehow passed into the AST producer. I don't think it's worth doing this right now because of time constraints, so temporary checkouts is probably the better solution for the time being.
More information about the cfe-commits