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
Try to unbreak the Makefile build.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215545 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a generic header guard checker + LLVM implementation.

The implementation is split into a generic part and a LLVM-specific part.
Other codebases can implement it with their own style. The specific features
supported are:

- Verification (and fixing) of header guards against a style based on the file path
- Automatic insertion of header guards for headers that are missing them
- A warning when the header guard doesn't enable our fancy header guard optimization
(e.g. when there's an include preceeding the guard)
- Automatic insertion of a comment with the guard name after #endif.

For the LLVM style we disable #endif comments for now, they're not very common
in the codebase. We also only flag headers in the include directories, there
doesn't seem to be a common style outside.

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215548 91177308-0d34-0410-b5e6-96231b3b80d8
Fix linking in the Makefile build.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215550 91177308-0d34-0410-b5e6-96231b3b80d8
In ancient times build targets had to be sorted topologically. Sometimes this behavior can still be observed today.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215553 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Update libdeps in clangTidyLLVMModule.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215589 91177308-0d34-0410-b5e6-96231b3b80d8
ClangTidyTests: Suppress FixHeaderGuards on win32 for now.

FIXME: It seems this might be incompatible to dos path. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215590 91177308-0d34-0410-b5e6-96231b3b80d8
AvoidCStyleCastsCheck: don't warn on casts in macros

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215799 91177308-0d34-0410-b5e6-96231b3b80d8
First version of a clang-rename tool.

Summary:
Note that this code is still grossly under-tested - the next steps will
be to add significantly better test coverage.

Patch by Matthew Plant.

Test Plan:

Reviewers:

Subscribers:

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215839 91177308-0d34-0410-b5e6-96231b3b80d8
Remove mention of non-existent 'test' directory.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215840 91177308-0d34-0410-b5e6-96231b3b80d8
Fix link libraries for clang-rename.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215843 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress ClangRenameTests/USRLocFinding.FindsVarUSR on msc17 for now. Will fix later.

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215857 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r215854 corresponding to r215857, "Suppress ClangRenameTests/USRLocFinding.FindsVarUSR on msc17 for now. Will fix later."

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215934 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clang-rename: Optimize libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215935 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-rename] revert r215839

The commit broke public build bots for more than 24 hours.

(view as text)
******************** TEST 'Clang Tools :: clang-rename/VarTest.cpp' FAILED ********************
Script:
--
cat /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp > /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp
clang-rename -offset=$(grep -FUbo 'foo;' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | head -1 | cut -d: -f1) -new-name=hector /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp -i --
sed 's,//.*,,' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp
--
Exit Code: 1

Command Output (stderr):
--
clang-rename: could not find symbol at /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp:2:1 (offset 14).



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@215947 91177308-0d34-0410-b5e6-96231b3b80d8
Revert rL215947: "[clang-rename] revert r215839"

Make tests not depend on grep supporting -bo.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@216041 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Allow /**/ comments on #endifs when checking header guards.

Turning block comments into line comments just creates unecessary churn.

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

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