[clang-tidy] Simplify ast matcher.

Turns out there is a better way to do this. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214874 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] forward arguments of the testing script to clang-tidy.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214952 91177308-0d34-0410-b5e6-96231b3b80d8
check_clang_tidy_fix.sh: added comments, use set -o errexit instead of '|| exit $?' on each command

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214956 91177308-0d34-0410-b5e6-96231b3b80d8
Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.

Summary:
Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.
It's a rather generic way to represent sets of strings (or patterns), so it may
be used for something else in ClangTidy. The new name would not look strange
when used to filter other entities.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214961 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Implement the include order checker for LLVM.

There are still a couple of rough edges in here but it is working fine
on LLVM and generates the same results as sort_includes.py if there are
no blank lines involved.

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

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

GNU sed does not recognize -E. Use -r that is supported by
both BSD and GNU instead.


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

Darwin's sed does not recognize -r to tell the tool that the
expression is the extended regexp. Seems we don't really need
the flag, as the expression is valid as the standard regexp.
Removing the flag.



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215171 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Fix sed flag, third try



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215175 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress clang-tools-extra/test/clang-tidy/llvm-include-order.cpp for targeting msvc. Investigating.

FYI, I can see the order;

  #include "j.h"
  #include "i.h"
  #include "clang-c/c.h" // hi
  #include "clang/b.h"
  #include "llvm-c/d.h" // -c
  #include "llvm/a.h"
  #include "gtest/foo.h"
  #include <s.h>

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215179 91177308-0d34-0410-b5e6-96231b3b80d8
Closing the loop. Now this sed invocation is back to what it was before the attempts to 'improve' it.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215189 91177308-0d34-0410-b5e6-96231b3b80d8
Reverting to Rui's last version, as it actually works both in Darwin and in Linux

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215192 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Don't index past the end of a vector.

We actually want the end iterator so just replace it with iterator arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215195 91177308-0d34-0410-b5e6-96231b3b80d8
clang-modernize: Transform::createActionFactory return ownership by unique_ptr instead of raw pointer.

Follow up to r213851 to simplify code and reduce the chance of future
leaks.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215214 91177308-0d34-0410-b5e6-96231b3b80d8
Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)

After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215324 91177308-0d34-0410-b5e6-96231b3b80d8
Update for API change in r215391


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215392 91177308-0d34-0410-b5e6-96231b3b80d8
Allow specifying file names and extra arguments when running clang-tidy unit tests.

Will become useful soon.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215438 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Disable the warning on implicit bool* to bool conversion in macros.

It's just too noisy and the warning isn't very helpful in those cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215452 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-query] Use the new API for named values from the Parser.

Summary: This finishes the support for autocomplete for user defined values..

Reviewers: pcc

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215474 91177308-0d34-0410-b5e6-96231b3b80d8
Also run extra tools unit tests in shared library builds.

Took me way too long to figure out why they didn't run.

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