Commit Graph

48 Commits

Author SHA1 Message Date
Kim Grasman bff9327eb2 Use std::to_string instead of snprintf 2020-08-01 14:13:40 +02:00
Kim Grasman 56dbfbe9ca Remove Google-specific handling of third-party
This is part of Google's original open-sourcing of IWYU.

They keep third-party libraries in a directory called, well,
'third-party', so there was lots of special casing for code in
that directory.

Remove that code, unit tests covering it and explicit mappings.

Keep one special case for allowing include cycles for files with
'internal/' in the name, to avoid breaking the include_cycle test
case. Not sure what to do about that longer term, but I didn't want to
remove the test case right now.
2019-03-10 21:45:20 +01:00
Kim Grasman 2b596dae66 Simplify handling of defined() operator
Clang r350891 changed the raw lexer so it asserts for IWYU's use
case.

Instead of re-lexing to catch symbols inside defined(), use a
PPCallbacks::Defined override to capture the tokens directly
(presumably, Defined did not exist when the open-coded parser was
added).

This removes a lot of code, including the PPCallbacks for If and Elif,
which are no longer necessary.

No functional change.
2019-01-19 11:13:41 +01:00
Kim Grasman bb61a50408 Terminology: as-typed -> as-written
Clang uses mostly "as-written" in its APIs. Follow that convention
more consistently.
2016-09-04 17:06:41 +02:00
Volodymyr Sapsai f8fd069e44 Fixed file heading comments not matching the filename (issue #83). Patch by Ryan Pavlik.
Also made the length of the first line to be 80 characters where possible.
2012-11-25 22:09:37 +00:00
csilvers+iwyu c23f0b9eef Some refactoring to straighten out dependencies.
This was motivated by an attempt to understand how iwyu_ast_util.cc
depended on iwyu_output, which turned out to be the use of VERRS.
I split the VERRS definition out into a separate iwyu_verrs module.
In the fallout from this I discovered some circular dependencies
that this CL attempts to disentangle.

R=csilvers
DELTA=603  (349 added, 222 deleted, 32 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3892
2011-12-01 02:30:18 +00:00
csilvers+iwyu f48d67c48d Actually implement the privacy rule here correctly:
// 3) Otherwise, if third_party/x.h #includes third_party/y.h,
//    add a mapping from y.h to x.h, and make y.h private.  This
//    means iwyu will never suggest adding y.h.

We were marking y.h private even when it wasn't in third_party.

R=dsturtevant
DELTA=28  (24 added, 0 deleted, 4 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3302
2011-09-22 15:39:43 +00:00
csilvers+iwyu 69d5187793 AddImplicitThirdPartyMappings had this comment:
// 3) Otherwise, if third_party/x.h #includes third_party/y.h,
//    add a mapping from y.h to x.h, and make y.h private.  This

But we weren't actually marking y.h as private.  This CL does
that.  It fixes an observed problem where iwyu was suggesting
we add a boost/do_not_add file, instead of the public boost
file that includes it indirectly.

A few tests have been updated to match the new semantics (I
think the test results were just wrong, before).  In
particular, third_party files that are 'internal' according to
iwyu no longer get returned for by 'candidate #include'
function.

R=chandlerc
DELTA=11  (4 added, 1 deleted, 6 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=3257
2011-09-19 18:02:56 +00:00
csilvers+iwyu ec3deb232c Update include_what_you_use to recognize
//third_party/python_runtime as a location for Python.h, just like
//third_party/python2_4_3. Move the tests over to the new name in
(eager) anticipation of //third_party/python2_4_3 going away.

R=csilvers
DELTA=7  (5 added, 0 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2869
2011-08-09 00:23:08 +00:00
csilvers+iwyu 60272bf071 Don't ask me why, but the automated system I use for updating patches wants to undo Paul Holden's latest patches and then re-apply them. I'm sure there's a way to skip doing that, but I don't know what it is, so I'm going to let it do its thing. This is step 1 (the revert).
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2805
2011-08-01 20:57:19 +00:00
csilvers+iwyu fadd402440 No longer special-case the typedefs in iosfwd. We have
general-purpose code that decides when the user of a typedef
owns the underlying type, and it works properly with iosfwd,
so we don't need this special-casing anymore.  On the other
hand, now that iosfwd is just a 'normal' io c++ header file,
we have to add it to the list of io re-exports (joining
iostream re-exports ostream, etc).

This should resolve the issues where iwyu is suggesting both
<iosfwd> and <iostream> in the same file.

R=wan
DELTA=28  (2 added, 22 deleted, 4 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2415
2011-07-02 00:05:21 +00:00
csilvers+iwyu 5e697a41ce Logs the construction of header mappings at verbose level
4 for debugging.

R=csilvers
DELTA=72  (57 added, 5 deleted, 10 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1981
2011-05-23 23:06:34 +00:00
csilvers+iwyu e154bd898c Changes IWYU's friend pragma to accept a regex instead of a glob.
Also makes it port.h's responsibility to export fnmatch
(before, it was the responsibility of either port.h or
iwyu_include_picker.cc, depending on the platform).

R=dsturtevant,csilvers
DELTA=152  (45 added, 4 deleted, 103 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1852
2011-05-12 23:10:38 +00:00
csilvers+iwyu 5ead9783de When keeping an #include, prefer the include-name as typed,
rather than the one clang gives us.  Normally they're the
same, but can be different when the #include could be accessed
via different paths, or via symlinks (for instance, if
we #include "a/b/c.h" and compile with "-I. -Ia -Ia/b", then
we could say #include "a/b/c.h", #include "b/c.h", or #include
"c.h").  clang will, as I understand it, pick one of these
three forms arbitrarily for FileEntry::getName.  We store the
name as it was actually typed in the source, and prefer it.

Obviously, the above only works for includes that already
exist.  If we suggest a new include, we will fall back on
whatever clang gives us, which is an arbitrary name (in
practice, the first form seen).

R=klimek
DELTA=161  (100 added, 1 deleted, 60 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1851
2011-05-12 23:10:15 +00:00
csilvers+iwyu 549e14739a Use a big hammer to never suggest <built-in> as an #include.
It normally happens when a .cc file in one */internal/*
directory tries to include a .h file in another.  This may be
a real bug -- crossing the internal boundary -- but the way to
point it out is not to replace the #include with one that
doesn't compile.  With this change, we'll just keep the
#include as it is.

R=wan
DELTA=17  (17 added, 0 deleted, 0 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1734
2011-05-04 18:31:58 +00:00
csilvers+iwyu 3d55404056 Include-what-you-use fixes by running it on itself.
R=dsturtevant,csilvers
	DELTA=215  (135 added, 45 deleted, 35 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1731
2011-05-04 18:29:59 +00:00
csilvers+iwyu 777bf85288 Fix two bugs in one!
First, the 'friend' pragma wasn't working at all, due to some
confusion about what needed to be a quoted include and what
needed to be a filepath.  I've cleaned all that up, updated
the comments, and added some tests to catch that situation.

Second, I moved the handling of /internal/ to a bespoke scheme
to using the normal 'friend' scheme -- basically, all internal
files automatically are friends with everyone else in the same
'package'.  This fixes a bug that caused us to map some
#include to <built-in>, when the include-chain was:
<built-in> -> foo/internal/bar.cc -> foo/internal/baz.h

Before this change, both foo/internal/bar.cc and
foo/internal/baz.h were considered private, since they are in
/internal/, so the #include of baz.h was mapped to the only
non-private "file" in the chain, which is <built-in>.  After
this change, foo/internal/bar.cc is still considered private,
but it doesn't matter since it's also considered a friend of
foo/internal/baz.h, and thus allowed to #include it.

R=wan,dsturtevant
DELTA=131  (83 added, 22 deleted, 26 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1728
2011-05-04 18:27:47 +00:00
csilvers+iwyu 3f0a6a763e Add the ability to add arbitrary comments to the warning
messages that iwyu produces (and that are shown with
--mode=why for iwyu.py).  Use this ability to comment two
non-obvious warnings we give: when requiring a full use
because of autocasting (one-arg, not-explicit constructor),
and when requiring a full use for the return type of a
function declaration.  Update appropriate existing tests to
check for the comment when appropriate.

R=wan,dsturtevant
DELTA=173  (82 added, 25 deleted, 66 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1726
2011-05-04 18:21:22 +00:00
csilvers+iwyu 6e7aed4043 Teaches IWYU more <foo.h> => <cfoo> mappings.
R=csilvers
DELTA=9  (7 added, 1 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1718
2011-05-04 18:17:28 +00:00
csilvers+iwyu 110d647867 Distinguish properly between system and user include
directories as specified on the compiler line, when deciding
whether to use "" or <>.  Hard-code in some rules for google3
where we don't do it quite right.

To fully fix the associated bug, I also noticed that our cfoo
<-> foo.h mappings was missing stddef.h, which is defined in a
different place from other headers.  I added it in.

R=wan,dsturtevant
DELTA=161  (69 added, 20 deleted, 72 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1597
2011-04-26 23:21:51 +00:00
csilvers+iwyu 006ec55728 There was an earlier bug with an entry in the include-picker
map omitting the necessary quotes around the filename.  The
check for this was suppressed because we shared the same code
for the filename map and symbol map.  Separate out that code
so we can do the check and avoid future problems.

DELTA=30  (6 added, 10 deleted, 14 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1595
2011-04-26 23:15:05 +00:00
csilvers+iwyu dde4c3ae67 OK, it's time to acknowledge that iwyu_test really only tests
the include-picker.  iwyu_test was always a terrible name,
anyway.

R=wan
DELTA=1059  (528 added, 528 deleted, 3 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1593
2011-04-26 23:14:03 +00:00
csilvers+iwyu 54eef2afa3 Reorganize the commandline flags by storing them in a globally
accessible 'commandlineflags' struct.  This replaces the
rather ad-hoc collection of variables and functions, spread
across 3 different files, that we have now.  The motivation is
adding a new commandline flag that I want to be visible in yet
a fourth file; I figured that was a good time to consolidate.
Now iwyu_globals holds everything.

R=wan,dsturtevant
DELTA=306  (161 added, 112 deleted, 33 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1591
2011-04-26 23:12:44 +00:00
csilvers+iwyu 3eab003857 The rule that files like 'foo/internal/bar.h' should always be
treated as private headers, and mapped to the nearest
including public header, was too strict.  The basic problem:
what if 'foo/internal/baz.h' tried to include
'foo/internal/bar.h'?  It should be able to.  In some cases,
'foo/internal/bar.h' isn't even included from any non-internal
file, and we end up suggesting to #include <built-in> (the
only non-private include in the include-chain).

I fixed this up by adding a new function for mapping private
headers to public, that takes into account who is doing the
including.  If foo/x/y/z is including foo/internal/a/b/c, we
don't say foo/internal/a/b/c is private in this context.  But
if joe/otherproject tries to include foo/internal/a/b/c, then
we *do* say foo/internal/a/b/c is private, and map it to its
closest public header.

I also took out unnecessary code that marked includer-files
that are '/internal/' as private, not just included-files.  We
should never need to mark includers as private; if the
includer-file is itself included in turn, we'll have ample
opportunity to mark it private then.  Otherwise, we run the
risk of a file being marked private, with nobody including it
that we can map to.

To better match the new semantics that files aren't
intrinsically public or private but it depends on the context,
I renamed GetPublicHeader* to GetCandidateHeader*,

R=wan,dsturtevant
DELTA=179  (84 added, 2 deleted, 93 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1590
2011-04-26 23:12:07 +00:00
csilvers+iwyu 20499967c7 Allow // comments at the end of pragma statements.
R=csilvers
DELTA=201  (183 added, 0 deleted, 18 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1586
2011-04-26 23:10:06 +00:00
csilvers+iwyu 33edb21133 Revamp the transitive-closure code to be faster. I basically
do this by caching when nodes are done, so we don't need to
re-compute their transitive closure multiple times.

This is necessary because the transitive-closure code is
getting to be a bottleneck, now that we have so many more
mappings because of the implicit third-party mappings.

One functional change: cycles in third-party code are now
silently ignored, rather than causing a death.  This is
because some third party code -- *cough* boost *cough -- has
cycles, and we can't fix that.

R=wan
DELTA=105  (58 added, 4 deleted, 43 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1581
2011-04-26 23:08:06 +00:00
csilvers+iwyu 6b0aa480a9 Oops, got a test case wrong -- missed a mapping. Dean even
pointed this out to me, but I didn't see it until after I had
submitted. :-(


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1579
2011-04-26 23:07:08 +00:00
csilvers+iwyu fc490f0aca Declaring all 'unused' third-party #includes as private was
too aggressive: it was too likely to conflict with some of the
hard-coded values in third-party map.  Plus, it's not
necessary, since we know these files are not included from any
google (non-third-party) code anyway.  So remove that, and
update the tests appropriately.

R=wan,dsturtevant
DELTA=7  (1 added, 1 deleted, 5 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1578
2011-04-26 23:06:38 +00:00
csilvers+iwyu 79a1ad0371 Add special support for third-party code, to make it less
likely we'll suggest adding an internal third-party header.
Basically, we stop trying to do include-what-you-use fixes on
third-party code.

More precisely, we make an 'implicit' judgment on which
third-party headers are public and which are private, based on
what existing code (in this translation unit) #includes.  We
marked all unincluded files as private, which means iwyu will
never suggest adding a new third-party file as an #include.
Insted, it will suggest some already-included third-party file
that gets the needed file transitively.

Since it's not really practical for us to fix third-party code
to have better #include hygiene, or even to mark up third-party
code with iwyu pragmas, we need to do something similar to
this.  We could just manually update iwyu_include_picker's
third_party_map with rules for every third party package we
have, but that's expensive.  This is much cheaper, with the
downside that we may miss some potential include-what-you-use
opportunities in third-party code (going from a more-generic
third-party include to a less-generic one).  I think that's a
low cost.

R=dsturtevant
DELTA=113  (104 added, 0 deleted, 9 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1577
2011-04-26 23:06:16 +00:00
csilvers+iwyu 6644c98f94 For some reason I was telling the include-picker about
includes-as-written rather than the actual file-path of the
included file.  Since the include-picker deals with actual
file-paths (of the decls), this made no sense, and indeed we
were seeing when code depended on a search path, we weren't
finding the proper include-mapping for it.

For instance, python .h files has
#include "dictobject.h"
rather than
#include "third_party/python2_4_3/gcc-3.4-glibc-2.11.1-grte-k8-linux-python2.6-opt/include/python2.6/dictobject.h

Thus, while we had code that correctly mapped
third_party/python2_4_3 to <Python.h>, it wasn't firing on the
above code because the include-picker saw it as just
"dictobject.h".  This is now fixed by using the actual
file-path.

While testing, I discovered the test-file was often calling
AddDirectInclude() improperly (with extra "'s).  It didn't
happen to matter, but I cleaned it up.

R=wan,dsturtevant
DELTA=43  (5 added, 2 deleted, 36 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1574
2011-04-26 23:04:37 +00:00
csilvers+iwyu 6704ad09ac Some entries in the system-include we shouldn't actually use
for normalizing suggested #include-paths, according to chandler.

While testing this, I realized ConvertToQuotedInclude can be
significantly simpler now, since a lot of the logic that was
hard-coded in there is actually encapsulated in
GlobalSearchPaths().

This gives one minor logic change, that 'unexpected' #includes
with absolute paths will now be "/weird/include" rather than
</weird/include>, but I've never seen either happen, so it
shouldnt' matter.

R=chandlerc
DELTA=62  (55 added, 5 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1572
2011-04-26 23:03:43 +00:00
csilvers+iwyu 6894c459af Ignore identity mapping when expanding globs. This allows us
to add globs like
"third_party/*.h"  -> "third_party/include.h"
without getting into an infinite loop because include.h maps
to itself.

R=wan
DELTA=35  (24 added, 0 deleted, 11 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1567
2011-04-26 23:00:56 +00:00
csilvers+iwyu 7eaabd610e Oops, I neglected to run the tests after adding the NULL
exception.  Fix the build.

R=wan
DELTA=5  (4 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1563
2011-04-26 22:59:06 +00:00
csilvers+iwyu ed381497a3 Add a test to protect against syntax errors in main(). Also
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
2011-04-13 03:11:35 +00:00
csilvers+iwyu 37c67ac363 I was not correctly getting the location for member-exprs. I
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
2011-04-12 05:00:17 +00:00
csilvers+iwyu 3ae053554f Resolve a few TODOs now that we get the actual search path
from clang.  We no longer need to have ad-hoc rules for
reading from system include directories, and the one rule we
do still have we've moved into a more appropriate place.

Also, a bug report showed we had left out a system private ->
public mapping we should have.  I had left it out because I
wanted to be conservative with the bits/ -> bits/ mappings,
but on closer study, these new mappings seem appropriate.

R=wan,dsturtevant
DELTA=84  (24 added, 59 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=1276
2011-04-06 20:07:58 +00:00
csilvers+iwyu fceb41ff6f I decided it's more maintainable to mock the include-search-paths rather than trying to use the driver in iwyu_test.cc, with its mock .cc file and everything.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=920
2011-03-18 07:00:41 +00:00
csilvers+iwyu 0d6022a68b Move the driver-startup code to iwyu_driver.cc. This
makes iwyu.cc cleaner.

For now, we use it only for iwyu_tests.cc, which needs
InitGlobal() to be called, which needs a CompilerInstance.

DELTA=516  (285 added, 210 deleted, 21 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=919
2011-03-18 07:00:23 +00:00
csilvers+iwyu acab22bb1c Make it no longer an error if a file specifies a mapping
explicitly, and is also in a glob pattern.  I was just lazy
before, but with the new Extend() method, it's actually less
code now with this change!

R=dsturtevant
DELTA=19  (15 added, 3 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=745
2011-03-04 00:57:46 +00:00
csilvers+iwyu c13983f294 Testing MOE. Should be a no-op
Revision created by MOE tool push_codebase.
MOE_MIGRATION=744
2011-03-04 00:52:15 +00:00
csilvers+iwyu 09a35dd920 Support @headername pragmas. Right now the parsing is pretty primitive -
we might want to beef it up.

R=csilvers
DELTA=219  (218 added, 0 deleted, 1 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=740
2011-03-04 00:30:49 +00:00
csilvers+iwyu fe45cabe52 Attempting to get nested class forward declarations right.
R=csilvers,wan
DELTA=145  (96 added, 2 deleted, 47 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=731
2011-03-04 00:26:01 +00:00
csilvers+iwyu 18656cccd8 Fixes compiler error in iwyu_test.cc.
R=csilvers
DELTA=2  (0 added, 0 deleted, 2 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=725
2011-03-04 00:21:55 +00:00
csilvers+iwyu 5a63e3a5ca At wan's suggestion, reorganize this code to keep the
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
2011-03-04 00:00:14 +00:00
csilvers 0587bf76cc The attached patch provides the following improvements to GetCanonicalName:
* .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
2011-02-24 21:14:57 +00:00
csilvers 69d76e1239 * Rewrite iwyu_include_picker; now more pragma-friendly (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.
2011-02-19 02:32:52 +00:00
csilvers 4ba3299fc0 A few cleanups; no functionality change.
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...
2011-02-11 23:08:41 +00:00
csilvers dee92b5e0a Initial release! Grains of salt not included. 2011-02-04 22:28:15 +00:00