Fix clang-query on Windows: flush llvm::outs() after each command.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@209313 91177308-0d34-0410-b5e6-96231b3b80d8
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
Never filter-out compile errors in clang-tidy, display them as errors.

Summary:
No filters should affect the display of errors. Fixed a few tests,
which had compile errors.

We need to think what we should do with mapped errors (-Werror).

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210044 91177308-0d34-0410-b5e6-96231b3b80d8
Don't assume an implicit error_code -> bool operator.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210070 91177308-0d34-0410-b5e6-96231b3b80d8
Remove inclusions of LLVM's private config.h

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210146 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy use override: Don't generate incorrect warnings without fixes

Add basic testing for the emitted diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210171 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: Make use-override tests stricter.

As per post review comment.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210173 91177308-0d34-0410-b5e6-96231b3b80d8
Allow per-file clang-tidy options.

Summary:
This patch makes it possible for clang-tidy clients to provide
different options for different translation units. The option, which doesn't
make sense to be file-dependent, was moved to a separate ClangTidyGlobalOptions
struct. Added parsing of ClangTidyOptions.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210260 91177308-0d34-0410-b5e6-96231b3b80d8
[C++11] Use 'nullptr'.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@210447 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify code. No functional change.

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