Fix UseAuto replacing declaration lists with new expressions

UseAuto used to replace declarion lists with new expressons where some
variable were not initialized with new.
This fix checks that every DeclStmt has a VarDecl with an initializer and it
also ensures that all declarations have the same type.

Added tests for multiple declarations and for typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@182736 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Transforms collect timing data.

Using updated form of newFrontendActionFactory(), Transforms now automatically
measure, if requested, how long it takes to apply a MatchFinder to a source
file. Other per-transform overhead, e.g. applying replacements, is not
currently measured. This behaviour is disabled for now and soon will be
connected to a new command line arg.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@182942 91177308-0d34-0410-b5e6-96231b3b80d8
Tweak autoconf link params to fix migrator build



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@182957 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the build. Use proper names here.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@182959 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add option to detect and use macros that expand to 'override'

Added a new option -override-macros which causes the, the add-override
transform to detect macros that expand to 'override' (like LLVM_OVERRIDE) and
use these macros instead of the override keyword directly.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183001 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for report execution times

-Added command line option -report-times to enable or disable the output. The
same option can be used to specify the output directory.
-Write timing data to a unique file in disk using json format.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183142 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: turn off PID-based perf data filenames

Getting PIDs on Windows is broken. Proper fix is simple but requires testing so
just disabling PID-based file names for now.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183154 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: collect performance timers per source file

Performance timers captured in each transform for all files they process are now collected and arranged per source file in preparation for writing to disk.

This revision is the last piece of the initial implementation of performance timer capturing.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183274 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Eliminate windows line endings

r183274 accidentally added windows line endings to changed lines. Changing them
back.



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

* Documented new command-line options.
* Moved usage to a new page.
  * Usage now split into general options and transform-related options.
* Main Migrator page now contains getting started and getting involved
  information.
  * Also included a JIRA issue collector button for logging bugs.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183417 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Refactor how global options are passed to Transforms

Refactored how global options are passed to Transforms to avoid widespread
changes every time a new global option is added.

Tests updated to reflect new interface.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183443 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add EnableHeaderModification flag

First step toward supporting header modifications: adding a flag that turns on
such modifications. Eventually header modifications will be on by default but
until all the kinks can be worked out, they must be explicitly enabled.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183444 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build after clang change r183781.

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183785 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: New mechanism for overriding file contents

Next step toward supporting migrating headers. Instead of using ClangTool's
ability to override all files at once, use a custom FrontendAction and override
only the source (and eventually headers) the action is about to parse.

Use of newFrontendActionFactory() is replaced with a new factory maker provided
by Transform.



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

Moving RewriteContainer's constructor impl to Transform.cpp to reduce clutter.
More things will soon be added to this header.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183856 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Replace file override container

A more flexible container for storing overrides is required for headers. Before
a source goes through the transform pipeline, any headers it references will be
in their original state and unaffected by transforms applied to other sources.
Therefore overrides for headers need to be kept separate for each source file.

This patch doesn't introduce support for storing header overrides yet. It only
replaces the existing structure and makes any necessary changes to support it.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183910 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: Add headers to file override information

File override structures now contain per-source overrides for headers.

For now, modified headers are written to disk when the Migrator is done.
This is only temporary behaviour since we can expect headers to be
changed by migrating multiple source files. The changes need to be
merged after all migrations are complete.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183917 91177308-0d34-0410-b5e6-96231b3b80d8
cpp11-migrate: const-correcting IncludeExcludeInfo

isFileIncluded() needed to be marked const.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@183918 91177308-0d34-0410-b5e6-96231b3b80d8
Also install cpp11-migrate when built with cmake. Fixes bug #16296

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