Re: Issue 986 in include-what-you-use: Circular includes aren't handled correctly

1 view
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Jan 6, 2022, 8:43:40 AM1/6/22
to include-wh...@googlegroups.com
Comment #0 on issue 986 by kimgr: Circular includes aren't handled correctly
https://github.com/include-what-you-use/include-what-you-use/issues/986

There's a pass (or two) in IWYU's analysis that talks about 'backwards' includes. If you run with a higher verbosity level, you'll see that IWYU discards b.h for this reason.

Reading `iwyu_output.cc`, it looks like this backward include avoidance is used as a crutch to work around other macro/typedef problems, but I can't really see through the specific rationale there. Overall, when I run into problems like these, I tend to merge the circularly dependent headers. Cycles are never good.


notifi...@include-what-you-use.org

unread,
Jan 6, 2022, 1:18:13 PM1/6/22
to include-wh...@googlegroups.com
Comment #1 on issue 986 by alejandro-colomar: Circular includes aren't handled correctly
https://github.com/include-what-you-use/include-what-you-use/issues/986

Hmmm, yes, I guess I'll have to either merge or split even more (into 3 headers). Thanks!


Reply all
Reply to author
Forward
0 new messages