Add clang-tidy -line-filter option to filter findings by line ranges.

Summary:
This is going to be used for a clang-tidy-diff script to display
warnings in changed lines only. The option uses JSON, as its value is not
intended to be entered manually.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209450 91177308-0d34-0410-b5e6-96231b3b80d8
Update the code according to the changes in r209468.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209470 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: Only add 'override' before inlined bodies.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209505 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tools-extra/test/clang-tidy/line-filter.cpp: Tweak line-filter.

On win32, %s is expanded to X:\path\to\test\line-filter.cpp. It was incompatible to yaml.
Although "%/s" could be available in Lit, ClangTidyDiagnosticConsumer::passesLineFilter() is unaware of comparision between '/' and '\\'.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209569 91177308-0d34-0410-b5e6-96231b3b80d8
ClangTidyOptionsTest.cpp: Rewrite literals. Raw string literals are unavailable on msc17.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209583 91177308-0d34-0410-b5e6-96231b3b80d8
Renamed runClangTidy argument Ranges to InputFiles, removed a TODO comment.
No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209743 91177308-0d34-0410-b5e6-96231b3b80d8
Remove redundant check discovered in post-commit review of r209505.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209882 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Remove redundant check discovered in post-commit review of r209505."

This breaks with MSVC.
With IsLateTemplateParsed, FunctionDecl::doesThisDeclarationHaveABody() returns true regardless of Body.

This reinstates what was fixed in r208985.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209896 91177308-0d34-0410-b5e6-96231b3b80d8
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209953 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: Extend the use-override check to understand 'final'.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210031 91177308-0d34-0410-b5e6-96231b3b80d8
Exit with error when no checks enabled.

Summary:
This seems like a more appropriate reaction to the user specifying a
single check with a wrong name, for example.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210043 91177308-0d34-0410-b5e6-96231b3b80d8
Updating branches/google/testing to r210043

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/google/testing@210155 91177308-0d34-0410-b5e6-96231b3b80d8