[PATCH] D19393: Move Checkers.inc to clang/include/.../Checkers

Chih-Hung Hsieh via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 15:03:46 PDT 2016


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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19393.54586.patch
Type: text/x-patch
Size: 2177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160421/8ddc8be0/attachment-0001.bin>


More information about the cfe-commits mailing list