Small cleanups from review comments.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219409 91177308-0d34-0410-b5e6-96231b3b80d8
Re-structure clang-rename into a library and the tool.

This allows the unit tests to link the library.

Patch by Xin Huang.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219609 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] misc-braces-around-statements.ShortStatementLines option

Add option ShortStatementLines to trigger this check only if the statement spans
over at least a given number of lines.

Modifications from the original patch:
  merged test/clang-tidy/misc-braces-around-statements-always.cpp into
  test/clang-tidy/misc-braces-around-statements.cpp and removed unnecessary
  CHECK-NOTs from the tests.

http://reviews.llvm.org/D5642

Patch by Marek Kurdej!



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219611 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Move some of the misc checks to readability/

Summary:
Some of the misc checks belong to readability/. I'm moving them there
without changing check names for now. As the next step, I want to register some
of these checks in the google and llvm modules with suitable settings (e.g.
BracesAroundStatementsCheck). I'm not sure if we want to create a "readability"
module, probably not.

Reviewers: djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219786 91177308-0d34-0410-b5e6-96231b3b80d8
Reformatted code samples in the unit test. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219788 91177308-0d34-0410-b5e6-96231b3b80d8
Fix llvm-header-guard check.

Summary:
This patch makes the check work better for LLVM code:
  * always fix existing #endif comments
  * use one space before the comment (+allow customization for other styles)

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219789 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid having "using namespace" for both "clang" and "llvm" namespaces.
This is fragile, as there are classes with the same name in both
namespaces (e.g. llvm::Module and clang::Module).


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219855 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Default options in modules.

Summary:
This patch allows modules to specify default options for the checks
defined in them. This way a sufficiently configurable check can be registered in
multiple modules with different default options. E.g. the SpacesBeforeComments
option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the
"google-readability-namespace-comment" check without modifying or extending the
check code.

This patch also registers the google-readability-braces-around-statements check
with suitable defaults.

Reviewers: djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219923 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Minor fixes for the NamespaceCommentCheck.

  * Make SmallVector size enough for all groups.
  * Allow trailing period in the comment.
  * Fix "// anonymous namespace qqq".



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219926 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add support for custom configuration file names/formats.

Summary: We're using different clang-tidy frontends (command-line, batch analysis jobs, code review integration), some of which are limited in the choice of configuration format. In order to avoid duplication of configuration information, we need to support the same configuration format in the command-line tool. This patch adds an extension point to make this possible without rewriting FileOptionsProvider.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

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

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