chh created this revision.
chh added reviewers: srhines, alexfh.
chh added a subscriber: cfe-commits.
Herald added subscribers: danalbert, tberghammer.

https://llvm.org/bugs/show_bug.cgi?id=27355
To compile with other binary output directory structures in build systems like 
Android.
Allow clang-tidy/ClangTidy.cpp and other files to include Checkers.inc like 
other .inc files,
with a relative path to clang/include.


http://reviews.llvm.org/D19393

Files:
  include/clang/CMakeLists.txt
  include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
  lib/StaticAnalyzer/Checkers/ClangSACheckers.h

Index: lib/StaticAnalyzer/Checkers/ClangSACheckers.h
===================================================================
--- lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ lib/StaticAnalyzer/Checkers/ClangSACheckers.h
@@ -26,7 +26,7 @@
 #define GET_CHECKERS
 #define CHECKER(FULLNAME,CLASS,CXXFILE,HELPTEXT,GROUPINDEX,HIDDEN)    \
   void register##CLASS(CheckerManager &mgr);
-#include "Checkers.inc"
+#include "clang/StaticAnalyzer/Checkers/Checkers.inc"
 #undef CHECKER
 #undef GET_CHECKERS
 
Index: lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
+++ lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
@@ -27,6 +27,6 @@
 #define GET_CHECKERS
 #define CHECKER(FULLNAME,CLASS,DESCFILE,HELPTEXT,GROUPINDEX,HIDDEN)    \
   registry.addChecker(register##CLASS, FULLNAME, HELPTEXT);
-#include "Checkers.inc"
+#include "clang/StaticAnalyzer/Checkers/Checkers.inc"
 #undef GET_CHECKERS
 }
Index: lib/StaticAnalyzer/Checkers/CMakeLists.txt
===================================================================
--- lib/StaticAnalyzer/Checkers/CMakeLists.txt
+++ lib/StaticAnalyzer/Checkers/CMakeLists.txt
@@ -1,8 +1,3 @@
-clang_tablegen(Checkers.inc -gen-clang-sa-checkers
-  -I ${CMAKE_CURRENT_SOURCE_DIR}/../../../include
-  SOURCE Checkers.td
-  TARGET ClangSACheckers)
-
 set(LLVM_LINK_COMPONENTS
   Support
   )
Index: include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
===================================================================
--- include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
+++ include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
@@ -0,0 +1,4 @@
+clang_tablegen(Checkers.inc -gen-clang-sa-checkers
+  -I ${CMAKE_CURRENT_SOURCE_DIR}/../../../
+  SOURCE ../../../../lib/StaticAnalyzer/Checkers/Checkers.td
+  TARGET ClangSACheckers)
Index: include/clang/CMakeLists.txt
===================================================================
--- include/clang/CMakeLists.txt
+++ include/clang/CMakeLists.txt
@@ -4,3 +4,4 @@
 add_subdirectory(Parse)
 add_subdirectory(Sema)
 add_subdirectory(Serialization)
+add_subdirectory(StaticAnalyzer/Checkers)


Index: lib/StaticAnalyzer/Checkers/ClangSACheckers.h
===================================================================
--- lib/StaticAnalyzer/Checkers/ClangSACheckers.h
+++ lib/StaticAnalyzer/Checkers/ClangSACheckers.h
@@ -26,7 +26,7 @@
 #define GET_CHECKERS
 #define CHECKER(FULLNAME,CLASS,CXXFILE,HELPTEXT,GROUPINDEX,HIDDEN)    \
   void register##CLASS(CheckerManager &mgr);
-#include "Checkers.inc"
+#include "clang/StaticAnalyzer/Checkers/Checkers.inc"
 #undef CHECKER
 #undef GET_CHECKERS
 
Index: lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
+++ lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
@@ -27,6 +27,6 @@
 #define GET_CHECKERS
 #define CHECKER(FULLNAME,CLASS,DESCFILE,HELPTEXT,GROUPINDEX,HIDDEN)    \
   registry.addChecker(register##CLASS, FULLNAME, HELPTEXT);
-#include "Checkers.inc"
+#include "clang/StaticAnalyzer/Checkers/Checkers.inc"
 #undef GET_CHECKERS
 }
Index: lib/StaticAnalyzer/Checkers/CMakeLists.txt
===================================================================
--- lib/StaticAnalyzer/Checkers/CMakeLists.txt
+++ lib/StaticAnalyzer/Checkers/CMakeLists.txt
@@ -1,8 +1,3 @@
-clang_tablegen(Checkers.inc -gen-clang-sa-checkers
-  -I ${CMAKE_CURRENT_SOURCE_DIR}/../../../include
-  SOURCE Checkers.td
-  TARGET ClangSACheckers)
-
 set(LLVM_LINK_COMPONENTS
   Support
   )
Index: include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
===================================================================
--- include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
+++ include/clang/StaticAnalyzer/Checkers/CMakeLists.txt
@@ -0,0 +1,4 @@
+clang_tablegen(Checkers.inc -gen-clang-sa-checkers
+  -I ${CMAKE_CURRENT_SOURCE_DIR}/../../../
+  SOURCE ../../../../lib/StaticAnalyzer/Checkers/Checkers.td
+  TARGET ClangSACheckers)
Index: include/clang/CMakeLists.txt
===================================================================
--- include/clang/CMakeLists.txt
+++ include/clang/CMakeLists.txt
@@ -4,3 +4,4 @@
 add_subdirectory(Parse)
 add_subdirectory(Sema)
 add_subdirectory(Serialization)
+add_subdirectory(StaticAnalyzer/Checkers)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to