Closed GoogleCodeExporter closed 9 years ago
It's not windows-specific at all; I noticed it too just today. The normalizer
doesn't try to deal with arbitrary versions past the "c++" anymore; it uses the
actual, correct list of include directories instead.
Looking through the code, it looks like it should be possible to replace
"/usr/include/c++/<version>/new", in iwyu.cc, with just "<new>" -- I designed
the code to allow for an already-quoted include. It's possible this breaks
iwyu_output.cc's SetPublicHeaders. (The right fix there might be to make
ConvertToQuotedInclude a noop if the input is already a quoted include. Or it
might be to just detect we're already a quoted include. Or it might be to
check if suggestd_header_ is not empty, and if so set the public header to
that.) Do you want to take a shot at that, and fix up anything that might need
fixing?
Original comment by csilv...@gmail.com
on 9 Mar 2011 at 11:56
Switching to "<new>" works fine in both the code base I'm working with and a
few hand-rolled test cases. It seems that SetPublicHeaders() is never invoked
for this symbol following this change. I think the NeedsSuggestedHeader (as
used by CalculateMinimalIncludes) is already taking care of this, but I might
have missed something.
So it seems like the attached (trivial :) patch is a good change to me, but I'm
not able to run the IWYU testsuite.
Original comment by paul.hol...@gmail.com
on 10 Mar 2011 at 10:13
Attachments:
Great, glad it works for you. I added an assert in iwyu_output.cc, just in
case, and committed as r60
Original comment by csilv...@gmail.com
on 10 Mar 2011 at 11:16
Original issue reported on code.google.com by
paul.hol...@gmail.com
on 9 Mar 2011 at 11:09