[clang-tidy] Count errors in ClangTidyDiagnosticConsumer

This re-applies r222363 reverted in r222390 after compilation errors in our
out-of-tree clang-tidy tests were fixed.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222427 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10

This value is used in cpplint, so we'd better be consistent.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222431 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: Add override before the first attribute.

Apparently attributes aren't sorted by source location.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222751 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: [misc-use-override] Add testcase with reversed attribute order

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222755 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Support initializer_list in google-explicit-constructor check

Summary:
According to the Google C++ Style Guide, constructors taking a single
std::initializer_list<> should not be marked explicit.

This change also changes the messages according to conventions used in Clang
diagnostics: no capitalization of the first letter, no trailing dot.

Reviewers: djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222878 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] More tests for the google-explicit-constructor check


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222924 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] google-explicit-constructor: don't match in template instantiations

This helps avoiding false positives related to the recently added
std::initializer_list<> handling.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@222981 91177308-0d34-0410-b5e6-96231b3b80d8
Update and simplify to match Clang r223095.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223098 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Make a test independent of the default check set.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223232 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Update help messages and docs.

Fixed incorrect examples of configuration, clarified the usage of -dump-config.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223235 91177308-0d34-0410-b5e6-96231b3b80d8
Make ArgumentsAdjuster an std::function (clang-tools-extra part of D6505).

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223249 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add clang-tidy check for unique_ptr's reset+release -> move

Replace x.reset(y.release()); with x = std::move(y);
If y is rvalue, replace with x = y; instead.

http://reviews.llvm.org/D6485

Patch by Alexey Sokolov!


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223460 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] google-runtime-int: Don't check C code.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@223651 91177308-0d34-0410-b5e6-96231b3b80d8
Handle newlines on Windows correctly.

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