[clang-tidy] Handle c-style casts from/to enums.

Summary: Convert c-style casts between integral end enum types to static_cast<>.

Reviewers: klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218760 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Clarify a comment.

No functional changes.


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

This check looks for if statements and loops: for, range-for, while and
do-while, and verifies that the inside statements are inside braces '{}'.
If not, proposes to add braces around them.

Example:

  if (condition)
    action();

becomes

  if (condition) {
    action();
  }

This check ought to be used with the -format option, so that the braces be
well-formatted.


Patch by Marek Kurdej!

http://reviews.llvm.org/D5395



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218898 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing 'override' keyword.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218961 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Documented check testing.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218962 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-modernize] Update for API change.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219063 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Allow space between "TODO" and "(user)"


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@219091 91177308-0d34-0410-b5e6-96231b3b80d8
Make clang-tidy's runCheckOnCode actually use the DiagnosticConsumer.

A precondition of that was to run both the preprocessor checks and AST
checks from the same FrontendAction, otherwise we'd have needed to
duplicate all involved objects in order to not have any references to a
deleted source manager.

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

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