[clang-tools-extra] r187707 - Fix clang-tidy dependencies and bad file comment.

Daniel Jasper djasper at google.com
Sun Aug 4 08:56:31 PDT 2013


Author: djasper
Date: Sun Aug  4 10:56:30 2013
New Revision: 187707

URL: http://llvm.org/viewvc/llvm-project?rev=187707&view=rev
Log:
Fix clang-tidy dependencies and bad file comment.

This addresses comments in post-commit review of r187345.

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

Modified: clang-tools-extra/trunk/clang-tidy/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/CMakeLists.txt?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-tidy/CMakeLists.txt Sun Aug  4 10:56:30 2013
@@ -14,8 +14,6 @@ target_link_libraries(clangTidy
   clangTooling
   clangBasic
   clangRewriteFrontend
-  clangTidyLLVMModule
-  clangTidyGoogleModule
   )
 
 add_subdirectory(tool)

Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Sun Aug  4 10:56:30 2013
@@ -172,13 +172,5 @@ void handleErrors(SmallVectorImpl<ClangT
     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

Modified: clang-tools-extra/trunk/clang-tidy/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/Makefile?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/Makefile (original)
+++ clang-tools-extra/trunk/clang-tidy/Makefile Sun Aug  4 10:56:30 2013
@@ -1,4 +1,4 @@
-##===- tools/extra/clang-tidy/Makefile ----sssss------------*- Makefile -*-===##
+##===- tools/extra/clang-tidy/Makefile ---------------------*- Makefile -*-===##
 #
 #                     The LLVM Compiler Infrastructure
 #

Modified: clang-tools-extra/trunk/clang-tidy/tool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/CMakeLists.txt?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/tool/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/CMakeLists.txt Sun Aug  4 10:56:30 2013
@@ -11,6 +11,8 @@ add_clang_executable(clang-tidy
   )
 target_link_libraries(clang-tidy
   clangTidy
+  clangTidyLLVMModule
+  clangTidyGoogleModule
   )
 
 install(TARGETS clang-tidy

Modified: clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/tool/ClangTidyMain.cpp Sun Aug  4 10:56:30 2013
@@ -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

Modified: clang-tools-extra/trunk/unittests/clang-tidy/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/CMakeLists.txt?rev=187707&r1=187706&r2=187707&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clang-tidy/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/unittests/clang-tidy/CMakeLists.txt Sun Aug  4 10:56:30 2013
@@ -14,6 +14,8 @@ target_link_libraries(ClangTidyTests
   gtest
   gtest_main
   clangTidy
+  clangTidyLLVMModule
+  clangTidyGoogleModule
   clangTooling
   clangBasic
   clangASTMatchers





More information about the cfe-commits mailing list