Output messages when clang-tidy applies fix-its.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3192

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@204909 91177308-0d34-0410-b5e6-96231b3b80d8
ClangTidy.cpp: Don't use non-static member initializer, for msc17.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@204931 91177308-0d34-0410-b5e6-96231b3b80d8
Add clang-tidy check to remove redundant .get() calls on smart pointers.

Summary:
This check finds and removes redundant .get() calls on smart pointers.
Example:
  ptr.get()->Foo()   ==>   ptr->Foo()

Reviewers: alexfh

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3186

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@204947 91177308-0d34-0410-b5e6-96231b3b80d8
clang-modernize: fix invalid assignment in findClangApplyReplacements()

Summary:
When clang-apply-replacements wasn't in the PATH or sitting next to
clang-modernize, findClangApplyReplacements() was finding the wrong path
(pointing to clang-modernize instead of nothing).

See the related PR at http://llvm.org/bugs/show_bug.cgi?id=18421

Reviewers: klimek

CC: silvas, cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3217

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205136 91177308-0d34-0410-b5e6-96231b3b80d8
Disable a few clang-tidy checks by default.

The goal is to be able to run clang-tidy on LLVM files without further
configuration for now. Once llvm.org/PR19306 is addressed, we can add a
configuration file instead and choose other defaults.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205407 91177308-0d34-0410-b5e6-96231b3b80d8
Fix regex bug in clang-tidy.

Also make tests slightly less dependent on default flags. Once we have
implemented configuration file support, we might want to store the
clang-tidy configuration for the tests there.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205408 91177308-0d34-0410-b5e6-96231b3b80d8
Update arc config to new domain.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205703 91177308-0d34-0410-b5e6-96231b3b80d8
Output clang-tidy errors in a consistent order.

Summary: Sort errors by path, file offset and message.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205759 91177308-0d34-0410-b5e6-96231b3b80d8
Extend the check to detect patterns like 'ptr.get() == nullptr'

Summary:
Extend the check to detect patterns like 'ptr.get() == nullptr'
It detects == and != when any argument is a ptr.get() and the other is a
nullptr.
Only supports standard smart pointer types std::unique_ptr and std::shared_ptr.
Does not support the case 'ptr.get() == other.get()' yet.

Reviewers: djasper

CC: cfe-commits, alexfh

Differential Revision: http://llvm-reviews.chandlerc.com/D3294

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205854 91177308-0d34-0410-b5e6-96231b3b80d8
Inject unique_ptr/shared_ptr into the test instead of using <memory>

Summary:
Inject unique_ptr/shared_ptr into the test instead of using <memory>
Libraries might not be present on tests.
This fixes the break introduces at rL205854.

Reviewers: klimek

CC: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205913 91177308-0d34-0410-b5e6-96231b3b80d8
test/clang-tidy/redundant-smartptr-get*.cpp: Both of them really require shell.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@205951 91177308-0d34-0410-b5e6-96231b3b80d8
Add new 'let' command to bind arbitrary values into constants.

Summary:
Add new 'let' command to bind arbitrary values into constants.
These constants can then be used in the matcher expressions.

Reviewers: pcc

CC: cfe-commits

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

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@206984 91177308-0d34-0410-b5e6-96231b3b80d8
QueryParser::doParse(): Fix msc17 build. Don't use initializer list.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@206998 91177308-0d34-0410-b5e6-96231b3b80d8
ClangQueryTests: Fix msc17 build. Non-static member initializers are unavailable.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207096 91177308-0d34-0410-b5e6-96231b3b80d8
QueryEngineTest.cpp: Appease g++47.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207097 91177308-0d34-0410-b5e6-96231b3b80d8
Blindly try to fix the clang-tools-extra build since my local build doesn't appear to be picking it up

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207230 91177308-0d34-0410-b5e6-96231b3b80d8
Slightly less blindly fixing clang-tools-extra now that I remember that the "check-clang" target doesn't check clang-tools-extra

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207231 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unnecessary explicit unique_ptr ctors now that buildASTFromCode returns a unique_ptr instead of a raw pointer.

git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207238 91177308-0d34-0410-b5e6-96231b3b80d8
Allow clang-tidy tests with any file names.


git-svn-id: http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@207353 91177308-0d34-0410-b5e6-96231b3b80d8
Specify checks in a more reliable way.


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