Use llvm::sys::fs::createTemporaryFile.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@185718 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Tidying up

* Some file headers were missing for files in Core/
* Some headers were included but not necessary
* CMakeLists.txt was linking in LLVMSupport even though CMakeLists in subdirs
  were linking it in too.
* StringRefisation of constructors of types in FileOverrides.h
* Other misc cleanups

Author: Guillaume Papin <guillaume.papin@epitech.eu>



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@185811 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Fixes for r185811

Some changes to r185811 broke certain build configurations. These changes should
fix them.

Author: Guillaume Papin <guillaume.papin@epitech.eu>



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@185814 91177308-0d34-0410-b5e6-96231b3b80d8
Generate a unique filename for a given header

This patch is in preparation for writing the header replacement to disk.
Added getUniqueHeaderName() that generates a unique header filename in
the same directory as the header file.

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


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186007 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add missing file headers in unit tests

Differential: http://llvm-reviews.chandlerc.com/D1124
Author: Guillaume Papin <guillaume.papin@epitech.eu>



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186093 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: FileOverrides/Transform refactoring.

This commit include the following changes:
 - SourceOverrides is now a class
   - it simplifies the usage for the Transform class, since now the
     replacements can be applied directly to the file overrides with
     SourceOverrides::applyReplacements().
   - it contains a method applyRewrites() which was previously named
     collectResults() in Transform.cpp. The method has been "optimized"
     a bit to re-use the allocated buffer (std::string::clear() is called).
   - since the class has some logic it's now unit tested
 - Now FileOverrides is a class (not a std::map typedef) and store pointers
   to the SourceOverrides. The reason is that the SourceOverrides can't be
   copied anymore (which was already something to avoid since it's can be a
   quite large object).

Author: Guillaume Papin <guillaume.papin@epitech.eu>

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


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186161 91177308-0d34-0410-b5e6-96231b3b80d8
Fix UseAuto not transforming iterator when non-fully qualifiers are used and
using inline namespaces is specified.

UseAuto used to fail to transform iterators when using inline namespaces and
non-fully qualified types, relying on a using directive previously declared.
- This fix uses the already define isFromStdNamespace matcher.
- Fixed tests and added a new test using inline namespaces.
- Added CustomMatchers to reuse common matchers among transforms.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186327 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm API change.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186449 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Use test fixture in preparation for more tests

Existing tests are not changed but the set-up work is moved into a fixture
to simplify forthcoming new tests.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@186575 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed some formatting issues with clang-format to get a baseline.

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