Fix clang-tidy dependencies and bad file comment.
authorDaniel Jasper <djasper@google.com>
Sun, 4 Aug 2013 15:56:30 +0000 (15:56 +0000)
committerDaniel Jasper <djasper@google.com>
Sun, 4 Aug 2013 15:56:30 +0000 (15:56 +0000)
This addresses comments in post-commit review of r187345.

llvm-svn: 187707

clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/clang-tidy/ClangTidy.cpp
clang-tools-extra/clang-tidy/Makefile
clang-tools-extra/clang-tidy/tool/CMakeLists.txt
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
clang-tools-extra/unittests/clang-tidy/CMakeLists.txt

index 5bcf70b..b547972 100644 (file)
@@ -14,8 +14,6 @@ target_link_libraries(clangTidy
   clangTooling
   clangBasic
   clangRewriteFrontend
-  clangTidyLLVMModule
-  clangTidyGoogleModule
   )
 
 add_subdirectory(tool)
index f5569bc..b7d3835 100644 (file)
@@ -172,13 +172,5 @@ void handleErrors(SmallVectorImpl<ClangTidyError> &Errors, bool Fix) {
     Rewrite.overwriteChangedFiles();
 }
 
-// This anchor is used to force the linker to link the LLVMModule.
-extern volatile int LLVMModuleAnchorSource;
-static int LLVMModuleAnchorDestination = LLVMModuleAnchorSource;
-
-// This anchor is used to force the linker to link the GoogleModule.
-extern volatile int GoogleModuleAnchorSource;
-static int GoogleModuleAnchorDestination = GoogleModuleAnchorSource;
-
 } // namespace tidy
 } // namespace clang
index 67d32b0..c221742 100644 (file)
@@ -1,4 +1,4 @@
-##===- tools/extra/clang-tidy/Makefile ----sssss------------*- Makefile -*-===##
+##===- tools/extra/clang-tidy/Makefile ---------------------*- Makefile -*-===##
 #
 #                     The LLVM Compiler Infrastructure
 #
index 27d511f..b966410 100644 (file)
@@ -11,6 +11,8 @@ add_clang_executable(clang-tidy
   )
 target_link_libraries(clang-tidy
   clangTidy
+  clangTidyLLVMModule
+  clangTidyGoogleModule
   )
 
 install(TARGETS clang-tidy
index 59508a1..47aefe7 100644 (file)
@@ -52,3 +52,17 @@ int main(int argc, const char **argv) {
 
   return 0;
 }
+
+namespace clang {
+namespace tidy {
+
+// This anchor is used to force the linker to link the LLVMModule.
+extern volatile int LLVMModuleAnchorSource;
+static int LLVMModuleAnchorDestination = LLVMModuleAnchorSource;
+
+// This anchor is used to force the linker to link the GoogleModule.
+extern volatile int GoogleModuleAnchorSource;
+static int GoogleModuleAnchorDestination = GoogleModuleAnchorSource;
+
+} // namespace tidy
+} // namespace clang
index d050042..c0f94cc 100644 (file)
@@ -14,6 +14,8 @@ target_link_libraries(ClangTidyTests
   gtest
   gtest_main
   clangTidy
+  clangTidyLLVMModule
+  clangTidyGoogleModule
   clangTooling
   clangBasic
   clangASTMatchers