Remove unused AST matcher.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@216901 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Use new ASTMatchers to identify template instantiations instead of copying it everywhere.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217035 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Eliminate inline copies of InTemplateInstantiation matcher.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217036 91177308-0d34-0410-b5e6-96231b3b80d8
ClangTidy misc-argument-comment check: don't check arguments to template
parameter packs.

Summary:
This disables this check for std::bind and similar functions that use
parameter packs to forward arguments to a different function. Name of the
parameter pack argument doesn't matter.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5168

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217039 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add an option to export suggested fixes into a file.

Allows gathering fixes and applying them with clang-apply-fixes.

Differential Revision: http://reviews.llvm.org/D5176

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217139 91177308-0d34-0410-b5e6-96231b3b80d8
Implemented clang-tidy configurability via .clang-tidy files.

Summary:
This adds a support for the .clang-tidy file reading using
FileOptionsProvider, -dump-config option, and changes tests to not depend on
default checks set.

Reviewers: klimek, bkramer, djasper

Reviewed By: djasper

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5186

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217155 91177308-0d34-0410-b5e6-96231b3b80d8
Plug a unit test memory leak.

MatchFinder.addMatcher doesn't take ownership.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217162 91177308-0d34-0410-b5e6-96231b3b80d8
Don't write files with no fixes.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217163 91177308-0d34-0410-b5e6-96231b3b80d8
Try to make VS 2012 happy after r217155

It was failing with:

C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/Support/ErrorOr.h(102) : error C3861: 'make_error_code': identifier not found

        C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\clang-tools-extra\clang-tidy\ClangTidyOptions.cpp(153) : see reference to function template instantiation 'llvm::ErrorOr<T>::ErrorOr<std::errc::errc>(E,void *)' being compiled

        with
        [
            T=clang::tidy::ClangTidyOptions,
            E=std::errc::errc
        ]

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217201 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a little python script that can run clang-tidy and apply fixes over an entire codebase.

Ever wanted to fix all the header guards in clang? Now it's easy.
  Make sure clang-tidy is in $PATH and a compilation database is available.
  $ ./run-clang-tidy.py -checks=-*,llvm-header-guard -fix
  ... get coffee (or more CPU cores) ...
  $ svn diff

Some may argue that this is just a glorified xargs -P, but it does a bit more ;)

Differential Revision: http://reviews.llvm.org/D5188

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217368 91177308-0d34-0410-b5e6-96231b3b80d8
Move clang-tools-extra docs 1.5 years into the future.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217369 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a couple of paragraphs on run-clang-tidy.py to the docs.

Happy tidying.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217373 91177308-0d34-0410-b5e6-96231b3b80d8
run-clang-tidy: Make clang-tidy path configurable and don't fail as horribly
when it's not around.

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


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217377 91177308-0d34-0410-b5e6-96231b3b80d8
clang-apply-replacements: Deduplicate paths with FileManager.

Bucket replacements by FileEntry instead of path. The same file with
different paths is very common, relative #include paths and symlinks can
easily create them. When that occurs we would apply the fix twice.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217440 91177308-0d34-0410-b5e6-96231b3b80d8
clang-apply-replacements: For-rangify.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217442 91177308-0d34-0410-b5e6-96231b3b80d8
Unique_ptrify PPCallbacks ownership. Goes with clang r217474.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217475 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Don't try to fix header guard #endif comments if there are escaped
newlines involved.

Getting that right is just not worth it.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217480 91177308-0d34-0410-b5e6-96231b3b80d8
Unique-ptrify ClangTidyCheckFactories. Add a more convenient alternative to
addCheckFactory: registerCheck.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5288

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217489 91177308-0d34-0410-b5e6-96231b3b80d8
std::function-ize ClangTidyCheckFactories.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D5289

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