[clang-tidy] Add a checker for long functions.

As this is very dependent on the code base it has some ways of configuration.
It's possible to pick between 3 modes of operation:

- Line counting: number of lines including whitespace and comments
- Statement counting: number of statements within compoundStmts.
- Branch counter

In addition a threshold can be picked, warnings are only emitted when it is met.
The thresholds can be configured via a .clang-tidy file.

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217768 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] When emitting header guard fixes bundle all fix-its into one
warning.

Before we would emit two warnings if the header guard was wrong and the comment
on a trailing #endif also needed fixing.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217890 91177308-0d34-0410-b5e6-96231b3b80d8
Rename unit test argument and add argument comments for clarity.

NFC

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@217947 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Don't emit the same fixit multiple times.

If we had many header files we would attach the fix-it for all files to all
warnings, oops. This is harmless 99.9% of the time but can confuse the rewriter
in some edge cases. Sadly I failed to create a small test case for this.

While there move fix-its instead of copying.

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