When using a compilation database where paths in the command are specified relative to the directory then replacements for these files are not applied since there is no path associated to the files.
Details
Diff Detail
Event Timeline
lib/Tooling/Refactoring.cpp | ||
---|---|---|
108–118 |
|
lib/Tooling/Refactoring.cpp | ||
---|---|---|
108–118 | No it wasn't, it was a mistake, I fixed it and added a regression test. The problem is that this patch breaks many other tests in c-index-test and also some unit tests. |
lib/Tooling/Refactoring.cpp | ||
---|---|---|
108–118 | Which ones and why? The easiest way to review that would be if you included the fixes for all breaking tests in the patch :D |
Addressed comments and fixed the case where virtual file paths cannot be made absolute. Also added a regression test.
Note that make_absolute already checks for the file to exist so it should be equivalent to check whether the file is virtual or not but if this introduces a performance issue then maybe we would want to have a function in the FileManager to query if a FileEntry is a virtual file (in the VirtualFileEntries vector).
lg
lib/Tooling/Refactoring.cpp | ||
---|---|---|
116 | I think the common practice is to use braces if one part of the if-else needs braces. |
I think the common practice is to use braces if one part of the if-else needs braces.