This patch fixes the path for the YAML files, and complements D1800 which makes replacements independent of the location.
Details
Diff Detail
Event Timeline
Could you expand "rel" to relative wherever it appears? LLVM style is shorthand-averse.
clang-modernize/Core/Transform.cpp | ||
---|---|---|
98–101 | Wouldn't it be better to do this once per source file in ClangModernizer.cpp instead of once per source per transform here? |
@revane, Sources are made absolute in ClangModernizer.cpp but Filename here is coming from the command line in the compilation database and that path is relative to the directory so in order to make this change only once we should parse the compilation database command and fix the path. I guess this could be the best solution but could involve some re-factoring since ClangTool assumes that the files are provided relative to the directory in the compilation database and changes directories so everything would be relative to the current directory.
CurrentSource is just used for YAML files to be created in the correct place since D1800 is fixing the replacements for relative paths.
@revane Please disregard these Overrides lines, they got mixed up in a merge. They are not anymore there.