Adjust for r188968.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188970 91177308-0d34-0410-b5e6-96231b3b80d8
Introducing new tool clang-replace

Introducing new tool 'clang-replace' that finds files containing
serialized Replacements and applies those changes after deduplication
and detecting conflicts.

Currently the tool does not apply changes. It stops just after the
deduplication and conflict report phase. Forthcoming patches will
complete functionality.

Both build systems updated for new tool.

Includes a conflict test case.

clang-replace added to Doxygen build.

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



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189008 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Write merged changes to disk

Functionality for clang-replace completed with the addition of the ability to
write merged replacements to disk.

Test added.

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



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189014 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 r188791 (buildbot failures on Windows).

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189017 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Exclude test-time deps from LIT test suite

Subdirectories of test/clang-replace contain test-time dependencies and not
more LIT tests. Tell LIT to ignore these directories from the test suite.



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

This reverts commit r189017.

It broke the windows bots:
- http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/4176
- http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3837

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189037 91177308-0d34-0410-b5e6-96231b3b80d8
clang-replace: Layout of test directory now more standard

Test-time dependencies now live within test/clang-replace/Inputs which is more
in line with llvm and clang test suites.

Added 'Inputs' to the lit config's 'exclude' list as with llvm's lit.cfg since
test-time dependencies should not have any lit scripts within.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@189047 91177308-0d34-0410-b5e6-96231b3b80d8
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