Fixed some issues that resulted in erroneous duplicate symbol error messages.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189228 91177308-0d34-0410-b5e6-96231b3b80d8
Updated the main comment with respect to problems and future directions.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189229 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Delete change description files

Added a command line option "-remove-change-desc-files" that triggers
the deletion of the change description files after merging and applying
regardless of success.

Differential Revision: http://llvm-reviews.chandlerc.com/D1492


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189268 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add a class to support include directives modifications

The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.

This should fix the reverted commit r189037 (buildbot failures on Windows).

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189354 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add Pass-By-Value Transform

Currently only constructor parameters stored in class-local storage are modified
to make use of the pass-by-value idiom but this is a base that can be be further
improved to handle more situations.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189363 91177308-0d34-0410-b5e6-96231b3b80d8
Temporarily revert r189363 as it seems to be failing to build.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189387 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Afford applying replacements in memory

For users of libclangReplace, this patch affords the ability to apply
replacements in memory instead of writing to disk.

Differential Revision: http://llvm-reviews.chandlerc.com/D1519



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189493 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add Pass-By-Value Transform

Currently only constructor parameters stored in class-local storage are modified
to make use of the pass-by-value idiom but this is a base that can be be further
improved to handle more situations.

This commit is the same as r189363 with additionnal fixes for the build issues.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189584 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Re-org of file structure

clang-replace is likely to move to clang proper one day soon. To facilitate
that move, renaming files and directory structure layout to ease transition for
users of clang-replace and libclangReplace.

For now, functionality still exists in clang::replace namespace. Header guards
and file comments updated.

Differential Revision: http://llvm-reviews.chandlerc.com/D1548



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189671 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Fix autoconf build failures

Updating autoconf files to reflect changes to directory structure



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189681 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Refactor for driver model of operation

Massive simplification of how replacements and file overrides are handled by
the migrator:
* Sources and headers are all treated the same.
* All replacements for a given translation unit are stored in the same
  TranslationUnitReplacements structure.
* Change tracking is updated only from main file; no need for
  propagating "is tracking" flag around.
* Transform base class no longer responsible for applying replacements.
  They are simply stored and main() looks after deduplication and
  application.
* Renamed -yaml-only to -serialize-replacements. Same restrictions apply:
  Can only request one transform. New restriction: formatting cannot also
  be turned on since it's basically a transform.
* If -serialize-replacements is requested, changes to files will not be
  applied on disk.
* Changed behaviour of function generating names for serialized
  replacements: Only the main source file goes into the name of the file
  since a file may contain changes for multiple different files.
* Updated HeaderReplacements LIT test for new serialization behaviour.
  * Replaced old test that ensures replacements are not serialized if
    -serialize-replacements is not provided. New version ensures changes
    are made directly to all files in the translation unit.
* Updated unit tests.
  * Due to major simplification of structures in FileOverrides.h, the
    FileOverridesTest is quite a bit simpler now.

Differential Revision: http://llvm-reviews.chandlerc.com/D1545


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189689 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Fixing autoconf build after adding libclangReplace dependency



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189691 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "cpp11-migrate: Fixing autoconf build after adding libclangReplace dependency"
Revert "cpp11-migrate: Refactor for driver model of operation"

This reverts commit r189691.
This reverts commit r189689.

This was breaking the phase 1 OS X build for ~2 hours.

https://smooshbase.apple.com/buildbot-internal/builders/phase1%20-%20sanity/builds/9559

I reverted the latter commit since I think the latter depended on the former.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189700 91177308-0d34-0410-b5e6-96231b3b80d8
Update tests to reflect clang r189769 which changes the printing of
'auto const' to 'const auto'.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189770 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Refactor for driver model of operation

Re-commit of r189691 and r189689 now with a proper autoconf fix.

Massive simplification of how replacements and file overrides are
handled by the migrator:
* Sources and headers are all treated the same.
* All replacements for a given translation unit are stored in the same
  TranslationUnitReplacements structure.
* Change tracking is updated only from main file; no need for
  propagating "is tracking" flag around.
* Transform base class no longer responsible for applying replacements.
  They are simply stored and main() looks after deduplication and
  application.
* Renamed -yaml-only to -serialize-replacements. Same restrictions apply:
  Can only request one transform. New restriction: formatting cannot also
  be turned on since it's basically a transform.
* If -serialize-replacements is requested, changes to files will not be
  applied on disk.
* Changed behaviour of function generating names for serialized
  replacements: Only the main source file goes into the name of the file
  since a file may contain changes for multiple different files.
* Updated HeaderReplacements LIT test for new serialization behaviour.
  * Replaced old test that ensures replacements are not serialized if
    -serialize-replacements is not provided. New version ensures changes
    are made directly to all files in the translation unit.
* Updated unit tests.
  * Due to major simplification of structures in FileOverrides.h, the
    FileOverridesTest is quite a bit simpler now.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189798 91177308-0d34-0410-b5e6-96231b3b80d8
Rename clang-replace -> clang-apply-replacements

Made changes throughout clang-tools-extra for the renaming of
clang-replace to clang-apply-replacements as per feedback from
community.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189832 91177308-0d34-0410-b5e6-96231b3b80d8
Ran clang-format.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189834 91177308-0d34-0410-b5e6-96231b3b80d8
Undo r189834 - broke test.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189835 91177308-0d34-0410-b5e6-96231b3b80d8
Ran clang-format for a base-line.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189836 91177308-0d34-0410-b5e6-96231b3b80d8
Added header dependencies support.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189837 91177308-0d34-0410-b5e6-96231b3b80d8