Closed GoogleCodeExporter closed 9 years ago
I think this will be the same as issue 54 -- we should be canonicalizing the
--check_also input in iwyu when we're reading in the pragma (so that's a third
place where filenames can be input into the system for iwyu). Let's keep the
python code alone.
Original comment by csilv...@gmail.com
on 19 Jul 2011 at 12:02
In that case I think this change boils down to the second patch
(canonicalise_glob_and_filepath.patch)
The paths that are passed on the command-line (via --check_also) need to be
canonicalised for AddGlobToReportIWYUViolationsFor(). The other place that this
function is called is IwyuPreprocessorInfo::FileChanged_EnterFile(), and as
that path also requires canonicalisation I think it makes sense to do this in
AddGlobToReportIWYUViolationsFor().
That leaves ShouldReportIWYUViolationsFor(), which must canonicalise the path
that is returned by GetFilePath().
The third place that you mention - the filenames that are specified in pragmas
- will be cleaned up by the canonicalise_paths.patch in Issue 54
(ConvertToQuotedInclude() calls NormaliseFilePath() which calls
CanonicalizeFilePath()).
So I think canonicalise_glob_and_filepath.patch, along with the patch from
Issue 54, is sufficient to get most of the tests passing on Windows.
Original comment by paul.hol...@gmail.com
on 19 Jul 2011 at 10:02
It looks like only the first diff in canonicalise_glob_and_filepath.patch is
needed anymore: with the issue-54 patch, GetFilePath() already canonicalizes
(since it calls NormalizeFilePath()), so the second diff isn't needed.
Feel free to apply the first diff and commit.
Original comment by csilv...@gmail.com
on 19 Jul 2011 at 11:11
Ah, yes - only the first diff was necessary. I've applied this in r279, thanks.
Original comment by paul.hol...@gmail.com
on 20 Jul 2011 at 8:34
Original issue reported on code.google.com by
paul.hol...@gmail.com
on 17 Jul 2011 at 12:25Attachments: