Issue 1251 in include-what-you-use: IWYU wants to pull in iosfwd "for std"

1 view
Skip to first unread message

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

unread,
Apr 29, 2023, 1:00:06 AM4/29/23
to include-wh...@googlegroups.com
New issue 1251 by computerquip: IWYU wants to pull in iosfwd "for std"
https://github.com/include-what-you-use/include-what-you-use/issues/1251

I'm not sure what this means. For every file that has an std type of any kind, it keeps wanting to pull in iosfwd "for std". What does this mean, what causes it, and what can I do about it?


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

unread,
Apr 29, 2023, 1:51:55 PM4/29/23
to include-wh...@googlegroups.com
Comment #1 on issue 1251 by kilroyd: IWYU wants to pull in iosfwd "for std"
https://github.com/include-what-you-use/include-what-you-use/issues/1251

It would help if you could specify the OS and compiler (i.e. standard libraries) that you're using, as well as IWYU version.

At a guess, does the code you are checking do `using namespace std`?


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

unread,
Apr 29, 2023, 6:03:30 PM4/29/23
to include-wh...@googlegroups.com
Comment #2 on issue 1251 by computerquip: IWYU wants to pull in iosfwd "for std"
https://github.com/include-what-you-use/include-what-you-use/issues/1251

Sorry. I'm using Clang 16 from the LLVM APT repository on 18.04 with libgcc-s1 from the test tool repository (since the newer LLVM binaries require it and 18.04 is relatively old).

Also, yes, those files do use `using namespace std`. Is that the cause? I do have other headers that have std such as `<string>` if it's any consolation. What can I do about it?


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

unread,
Apr 29, 2023, 6:29:45 PM4/29/23
to include-wh...@googlegroups.com
Comment #2 on issue 1251 by computerquip: IWYU wants to pull in iosfwd "for std"
https://github.com/include-what-you-use/include-what-you-use/issues/1251

Sorry. I'm using Clang 16 from the LLVM APT repository on Ubuntu 18.04 with libgcc-s1 from the test tool repository (since the newer LLVM binaries require it and 18.04 is relatively old).

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

unread,
May 1, 2023, 12:43:23 PM5/1/23
to include-wh...@googlegroups.com
Comment #4 on issue 1251 by computerquip-work: IWYU wants to pull in iosfwd "for std"
https://github.com/include-what-you-use/include-what-you-use/issues/1251

Alright, I'll close this since it's at best a duplicate of another issue. Thanks for the response, that cleared up my confusion.


Reply all
Reply to author
Forward
0 new messages