Open GoogleCodeExporter opened 8 years ago
Thanks for the report!
This actually seems to work on trunk (yay!):
$ include-what-you-use.exe -I155 155/use.cpp
(155/use.cpp has correct #includes/fwd-decls)
> Also, it would be nice if the recommendations used the macro-ized
> original names instead of the expanded names (since the entire reason
> they're behind macros is to prevent the use of the 'real' names),
> though I have no idea how one would even begin to go about doing that.
This is an interesting observation, one we (or at least I) haven't thought of.
I wonder if it always holds that we want to preserve the #include line exactly
as written...? Especially with macros, they might evaluate to different files
in different contexts, so when IWYU moves them around things might get chaotic.
We're discussing ways of making the name vs file infrastructure better, and
this is another good use case that I'd like to address. IWYU currently works
mostly with include-names and parse them to figure out stuff like "is system
header? use quotes or angles?", etc. We'd like to have it work with FileEntry
instances instead so it can make those decisions on firmer grounds. But the
include-name-as-typed-even-before-macros-expansion might need to be carried
through anyway.
Original comment by kim.gras...@gmail.com
on 30 Aug 2014 at 7:56
Original issue reported on code.google.com by
bunge...@chromium.org
on 30 Aug 2014 at 3:27