Track changes from clang r211448.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211450 91177308-0d34-0410-b5e6-96231b3b80d8
Add clang-tidy-diff.py script to run clang-tidy and display warnings on changed lines only.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211698 91177308-0d34-0410-b5e6-96231b3b80d8
Add a check to flag the usage of C-style casts (Google Style).

Summary:
Add a check to flag the usage of C-style casts, as per Google Style
Guide:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Casting#Casting

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211702 91177308-0d34-0410-b5e6-96231b3b80d8
Apparently, some versions of diff like -U0 more than -u0.


git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211703 91177308-0d34-0410-b5e6-96231b3b80d8
Rolling back, as the test fails on one of the buildbots:
  http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/13505/steps/check-all/logs/Clang%20Tools%3A%3Ac-style-casts.cpp



git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211708 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress clang-tidy-diff.py. It is incompatible to py26 due to argparse.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211741 91177308-0d34-0410-b5e6-96231b3b80d8
Make the clang-tidy-diff.py test conditional on the presence of Python 2.7. Use the python binary from the configuration.


git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211789 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp on win32 due to dos path issue.

I'll fix it later.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211831 91177308-0d34-0410-b5e6-96231b3b80d8
Make clang-tidy-diff.py py3-compatible.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@211834 91177308-0d34-0410-b5e6-96231b3b80d8
Another attempt to add a clang-tidy check for flagging C-style casts.

Summary:
The first version failed the SubstNonTypeTempateParmExpr-related test
on some buildbots. This one uses the new substNonTypeTempateParmExpr matcher to
filter out implicit C-style casts.

This patch depends on D4327.

Reviewers: djasper

Reviewed By: djasper

Subscribers: aemerson, cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212002 91177308-0d34-0410-b5e6-96231b3b80d8
Added a comment to document relation of this check to -Wold-style-cast.


git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212033 91177308-0d34-0410-b5e6-96231b3b80d8
Initialize ClangTidyMessage::FileOffset field to avoid unitialized variable access when sorting errors on output.


git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212042 91177308-0d34-0410-b5e6-96231b3b80d8
Consistently handle clang-tidy check names in ClangTidyError.

Summary:
This patch removes " [check-name]" from the end of
ClangTidyMessage::Message. The " [check-name]" part is only appended when
printing diagnostics on the console. Clang errors are now marked with
"clang-diagnostic-error" check name, remarks and unknown warnings are marked
with "clang-diagnostic-unknown".

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212180 91177308-0d34-0410-b5e6-96231b3b80d8
clang-modernize: Instantiate llvm::Registry<TransformFactory>.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212270 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: Instantiate llvm::Registry<clang::tidy::ClangTidyModule>.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212271 91177308-0d34-0410-b5e6-96231b3b80d8
Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.

This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212316 91177308-0d34-0410-b5e6-96231b3b80d8
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212367 91177308-0d34-0410-b5e6-96231b3b80d8
Track changes from clang r212387, r212388

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212390 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm api change.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@212406 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a little checker for Twine locals in LLVM.

Those often cause use after free bugs and should be generally avoided.
Technically it is safe to have a Twine with >=2 components in a variable
but I don't think it is a good pattern to follow. The almost trivial checker
comes with elaborated fix-it hints that turn the Twine into a std::string
if necessary and otherwise fall back to the original type if the Twine
is created from a single value.

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