[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
Moved main() to the clang::tidy namespace, no functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217493 91177308-0d34-0410-b5e6-96231b3b80d8
Implemented clang-tidy-check-specific options.

Summary:
Each check can implement readOptions and storeOptions methods to read
and store custom options. Each check's options are stored in a local namespace
to avoid name collisions and provide some sort of context to the user.

Reviewers: bkramer, klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217661 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master' into feature/boost-conventions-check

Conflicts:
	clang-tidy/llvm/IncludeOrderCheck.cpp
	clang-tidy/utils/HeaderGuard.cpp
Fix after merge.