Originally reported on Google Code with ID 99
What steps will reproduce the problem? Give the *exact* arguments passed
to include-what-you-use, and attach the input source file that gives the
problem (minimal test-cases are much appreciated!)
1. Run IWYU over the following trivial file
#include <cstdlib>
int main(int argc, char* argv[]) {
return EXIT_SUCCESS;
}
$ ./include-what-you-use ./exit_success.cpp
exit_success.cpp should add these lines:
exit_success.cpp should remove these lines:
- #include <cstdlib> // lines 1-1
The full include-list for exit_success.cpp:
---
What is the expected output? What do you see instead?
I would not expect that it would tell me to remove the header file that defines a used
macro. I've also seen it suggest removing other headers when macros defined in those
headers are used, for macros that I define in my own headers. In the codebase with
which I am working, IWYU is recommending the removal of the header that defines the
local analogue to DISALLOW_EVIL_CONSTRUCTORS.
What version of the product are you using? On what operating system?
r472 on OS X Mountain Lion
Please provide any additional information below.
</cstdlib></cstdlib>
Reported by andrew.c.morrow on 2013-06-28 23:40:14
该提问来源于开源项目:include-what-you-use/include-what-you-use