Comment #16 on issue 1115 by bolshakov-a: IWYU pragma: export not effective for forward declared enum class
https://github.com/include-what-you-use/include-what-you-use/issues/1115
> If the underlying type of an enum is bool then iwyu will generate forward declarations with an underlying type of _Bool
It really does... Thank you! I hope I can take a look at the weekend.
> iwyu will suggest illegal forward declarations of scoped enums that are inside a class
That's strange. I even wrote [a test case](
https://github.com/include-what-you-use/include-what-you-use/blob/master/tests/cxx/enums.cc#L38) that it doesn't occur. Could you please provide a minimal repro?
> ... another long standing issue with iwyu: it suggests forward declarations in cpp files and not only in header files. There are zero valid reasons for this tool to add a forward declaration to a cpp file so every suggestion is generates is a false positive which must be manually suppressed.
I agree. Maybe, I'll make a PR in some better times...
But I just wonder why you don't want to place opaque declarations instead of suppressing them? Do you really have to change enum underlying types often? And even if you really do, it could be easily done just with auto-replacing. Though, a lot of changes may be in git diff in that case...