From: Chih-Hung Hsieh Date: Thu, 28 Apr 2016 01:09:09 +0000 (+0000) Subject: [analyzer] Move Checkers.inc to clang/include/... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8efc9afef89952f66ba1d97ac7fd2b0f52718477;p=clang [analyzer] Move Checkers.inc to clang/include/... Simplify sharing of Checkers.inc with other files like ClangTidy.cpp. Differential Revision: http://reviews.llvm.org/19393 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267832 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/CMakeLists.txt b/include/clang/CMakeLists.txt index 1d8aecd3b2..feb81f0686 100644 --- a/include/clang/CMakeLists.txt +++ b/include/clang/CMakeLists.txt @@ -4,3 +4,4 @@ add_subdirectory(Driver) add_subdirectory(Parse) add_subdirectory(Sema) add_subdirectory(Serialization) +add_subdirectory(StaticAnalyzer/Checkers) diff --git a/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt b/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt new file mode 100644 index 0000000000..37dd9e8482 --- /dev/null +++ b/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt @@ -0,0 +1,4 @@ +clang_tablegen(Checkers.inc -gen-clang-sa-checkers + -I ${CMAKE_CURRENT_SOURCE_DIR}/../../../ + SOURCE Checkers.td + TARGET ClangSACheckers) diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/include/clang/StaticAnalyzer/Checkers/Checkers.td similarity index 100% rename from lib/StaticAnalyzer/Checkers/Checkers.td rename to include/clang/StaticAnalyzer/Checkers/Checkers.td diff --git a/lib/StaticAnalyzer/Checkers/CMakeLists.txt b/lib/StaticAnalyzer/Checkers/CMakeLists.txt index e1d98cf0d0..479030d889 100644 --- a/lib/StaticAnalyzer/Checkers/CMakeLists.txt +++ b/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 ) diff --git a/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp b/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp index 77a5a72264..fb9e366c3d 100644 --- a/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp +++ b/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp @@ -27,6 +27,6 @@ void ento::registerBuiltinCheckers(CheckerRegistry ®istry) { #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 } diff --git a/lib/StaticAnalyzer/Checkers/ClangSACheckers.h b/lib/StaticAnalyzer/Checkers/ClangSACheckers.h index 05b4a61c5a..d6e96f27a7 100644 --- a/lib/StaticAnalyzer/Checkers/ClangSACheckers.h +++ b/lib/StaticAnalyzer/Checkers/ClangSACheckers.h @@ -26,7 +26,7 @@ class CheckerRegistry; #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