Drop superfluous semicolon. GCC's -pedantic warns about this.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218310 91177308-0d34-0410-b5e6-96231b3b80d8
Provide user name in ClangTidyOptions.

Summary:
This adds the ClangTidyOptions::User field and fills it from the USER
or the USERNAME environment variable, if possible. The FileOptionsProvider now
takes "default" options instead of "fallback" options, as it now uses these when
an option is not set in the configuration file (one exception is the checks
list).

Reviewers: bkramer, klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218402 91177308-0d34-0410-b5e6-96231b3b80d8
Clang-tidy google-readability-function check: don't warn on gmock
testing::Unused parameters.

Reviewers: bkramer, klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218443 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a -config={YAML} option.

Summary:
Add -config option to allow specifying configuration in YAML/JSON
format on the command line.

Reviewers: klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218512 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Test username substitution in TODO() check.

Summary:
This patch depends on D5501.
Check user name substitution more specifically by specifying it via the new
-config= option.
This also lets clang-tidy tests specify clang-tidy options before the '--'
when using check_clang_tidy_fix.sh.

Reviewers: klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218515 91177308-0d34-0410-b5e6-96231b3b80d8
Corrected a comment in check_clang_tidy_fix.sh

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218516 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Updated documentation.


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


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218571 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Fix documentation.

Try using code-block: console for command-line usage examples.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218572 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Updated documentation

Added an example of check-specific options.


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@218573 91177308-0d34-0410-b5e6-96231b3b80d8
[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
Small cleanups from review comments.

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