Use -std=c++11 when no compilation database is provided

Allow the migrator to be used without specifing --. If neither -- nor -p is
provided and no compilation database can be detecteded from the first source
file path then -std=c++11 is added as the only compiler argument.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188533 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.

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

This reverts commit r188610.

Issue with the absolute include paths not found in the unit tests on the Windows
bots. Needs investigation.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188611 91177308-0d34-0410-b5e6-96231b3b80d8
Add dependencies on TransformUtils library in preparation for re-applying r188666

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

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

This reverts commit r188791.

The Windows bots are still broken.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188795 91177308-0d34-0410-b5e6-96231b3b80d8
UniqueHeaderNameTest.cpp: Appease valgrind.

llvm::sys::path::native(dst, dst) might be overridden-safe in most cases, though.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@188800 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Use Replacement serialization from clang::tooling

Serialization of replacements has been moved to clang::tooling.

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



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