needed to be modified (or, in --dry_run mode, no files would
have been modified) and 1 otherwise.
R=dsturtevant
DELTA=61 (46 added, 1 deleted, 14 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=732
should add .cc files due to macros (though not other symbols).
In testing, I realized I was calling GetFilePath() on what was
possibly an invalid location, so I now check for that.
R=dsturtevant
DELTA=81 (75 added, 0 deleted, 6 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=730
run_iwyu_tests framework. This is the first use of the
_iwyu_flags_map framework, which had to be fixed up a bit to
work.
To help debugging problems, I added in some more logging
information, which I've kept.
I also noticed that tests weren't running on my stock ubuntu
python. This seems to be because the stock unittest module
doesn't run the global setUp in main. So I renamed the global
setUp and now call it manually.
R=dsturtevant
DELTA=250 (117 added, 121 deleted, 12 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=729
'include what you use' mantra when it came to forward
declares: before this CL, it said, "if someone you are
#including from forward-declares a class for you, you don't
have to forward-declare that class yourself." But that means
you can't refactor .h files to remove unnecessary
forward-declares. If you need to forward-declare something,
you should forward-declare it yourself, not get that fwd-decl
from an #include.
(Note the story is different if you're getting the
*definition* of a class from an #include, even if you only
need a forward-declaration for that class. In that case,
using the #include is fine. The only thing this CL addresses
is when you try to use a .h file to forward-declare something
for you.)
R=dsturtevant
DELTA=206 (137 added, 41 deleted, 28 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=727
match. This is necessary when the input is NULL.
R=dsturtevant,wan
DELTA=7 (3 added, 0 deleted, 4 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=724
ASTFlattenerVisitor. We now store full types instead when
needed. A lot more machinery, alas. :-(
R=chandlerc
DELTA=134 (97 added, 3 deleted, 34 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=723
public/private information in a separate data structure from
the mapping. Besides being a bit clearer to follow, this
makes it easier to verify that we're consistent in declaring a
file public or private. We now do verify this, which turned
up a few inconsistencies in the hard-coded data (not anything
major), which I've fixed.
This prompted a bit of a change in the API, to separate out
adding of mappings from adding of public/private-ness. This
fits the iwyu preprocessor workflow better, allowing us to
resolve a TODO or two.
I've also cleaned up a comment or two.
R=wan
DELTA=186 (81 added, 60 deleted, 45 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=722
* .cxx and .cpp extensions are handled (I'm using the same list as used in IsHeaderFile() - perhaps .inl should be considered too)
* Path separators are canonicalised on Win32. Our build system provides search paths with forward slashes as separators, but paths with backslashes creep in somewhere. So foo\bar\baz.h and foo/bar/baz.h should now be considered the same.
I've added a couple of tests for the first case to the testsuite, but the README suggests that there's no framework for the 'more_tests' tests yet. When this is available I'll add some extra tests for separator canonicalisation.
There are a few TODOs:
* CanonicalizeFilePath should probably collapse '../' sequences, i.e. a/b/../c and a/c should be considered the same (this is handled nicely by PathCanonicalize on Win32, perhaps there's a nice Unixy equivalent?)
* We should probably ignore case on Win32.
(BTW there is a 'canonicalize()' function in llvm/Support/FileSystem.h which would do what we want, but it doesn't seem to be implemented :/ )
Resolves
http://code.google.com/p/include-what-you-use/issues/detail?id=15
Patch submitted by paul.hol...@gmail.com and reviewed by csilvers
* 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.
sizeof_reference, varargs_and_references, template_function_arg.
2. Add code to print a given ASTNode, no matter what kind of node it is.
3. Print the node contents in the ast-node flattener, at debug level 7.
All code written by csilvers, and reviewed by wan and dsturtevant.
1) Removed the use of <tr1/tuple> -- it wasn't getting us that much,
and cost us in portability. Resolves
http://code.google.com/p/include-what-you-use/issues/detail?id=2
2) Removed unused 'using' statements, renamed some vars to be cleaner,
added 'const' in a few places I could, etc.
3) Refactored some logic into a new function GetCalleeFunctionType().
4) Made a few tests more robust by using better fakes (mostly in
more_tests, so not directly relevant to the opensource code).
5) Added a check to make sure we don't add any new include-mappings
after we were supposed to have finialized the mappings.
All code reviewed by wan and/or dstur...