attributes a use to the wrong place (this can happen in
macros, or when iwyu is using stronger use-rules than the
language requires, like in typedefs). We basically say: "if
foo.h includes bar.h (either directly or indirectly), and we
are thinking of suggesting that bar.h include foo.h, don't."
This covers up bugs in iwyu, but doesn't resolve them. We
still need to introduce a concept of 'soft' use, and fix up
typedef handling, to really have 'solved' this problem. But
this should be good enough for the fixit.
R=wan
DELTA=199 (187 added, 0 deleted, 12 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=1564
test some main()-invariant logic while I'm at it.
DELTA=19 (16 added, 0 deleted, 3 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=1409
thought I was saying the location is where the . (or ->) is,
which is what I want, but clang doesn't actually expose that.
So I have go through some hoops to try to figure it out.
We were actually seeing a problem with this when running:
blaze build --host_cpu=k8 --compile_only -k --crosstool_top=//third_party/llvm/crosstool --plugin=//devtools/maintenance/include_what_you_use:run_iwyu //gws/plugins/local/src:enhanced_listing_ad
It has 'msg_->MSG_foo' in it, where MSG_foo is a macro. We
were attributing this use to the file defining MSG_foo, rather
than to us. With this change, we properly attribute it to us.
R=dsturtevant
DELTA=150 (125 added, 6 deleted, 19 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=1347
Usage: // IWYU pragma: no_include "foo/bar/baz.h"
This inhibits IWYU from suggesting that baz.h be included.
R=csilvers
DELTA=109 (98 added, 1 deleted, 10 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=1339
* Add support for FakeNamedDecls for tests (dsturtevant)
* Write our own symbol sanitizer rather than getQualified... (csilvers)
* Change run_iwyu_tests to better fit python test framework (csilvers)
* Revamp IWYU pragmas, now support keep + export + private (dsturtevant)
* Fix a bug when nested classes are defined out of line (csilvers)
* Add the ability to print an arbitrary ASTNode (csilvers)
All code by csilvers was reviewed by wan and dsturtevant. Code by
dsturtevant was reviewed by csilvers.