clang-tidy: Fix build since r198402 in the case that the source tree of clang-tools-extra is not located on clang/tools/extra.

FIXME: Get rid of private headers in other modules.
llvm-svn: 198403
GitOrigin-RevId: 4fd9913803a4678db206fdd5f727f535716eaa86
diff --git a/clang-tidy/CMakeLists.txt b/clang-tidy/CMakeLists.txt
index a1610b7..9e0c9cc 100644
--- a/clang-tidy/CMakeLists.txt
+++ b/clang-tidy/CMakeLists.txt
@@ -2,6 +2,10 @@
   Support
   )
 
+# FIXME: Get rid of private headers in other modules.
+# It is for convenience of clang/lib/StaticAnalyzer.
+include_directories(${CLANG_BINARY_DIR} ${CLANG_SOURCE_DIR})
+
 add_clang_library(clangTidy
   ClangTidy.cpp
   ClangTidyModule.cpp
diff --git a/clang-tidy/ClangTidy.cpp b/clang-tidy/ClangTidy.cpp
index 301172f..a9edfd8 100644
--- a/clang-tidy/ClangTidy.cpp
+++ b/clang-tidy/ClangTidy.cpp
@@ -38,7 +38,7 @@
 #include <algorithm>
 #include <vector>
 // FIXME: Move AnalysisConsumer to include/clang/StaticAnalyzer/Frontend.
-#include "../../../lib/StaticAnalyzer/Frontend/AnalysisConsumer.h"
+#include "lib/StaticAnalyzer/Frontend/AnalysisConsumer.h"
 
 using namespace clang::ast_matchers;
 using namespace clang::driver;
@@ -55,7 +55,7 @@
 #define GET_CHECKERS
 #define CHECKER(FULLNAME, CLASS, DESCFILE, HELPTEXT, GROUPINDEX, HIDDEN)       \
   FULLNAME,
-#include "../../../lib/StaticAnalyzer/Checkers/Checkers.inc"
+#include "lib/StaticAnalyzer/Checkers/Checkers.inc"
 #undef CHECKER
 #undef GET_CHECKERS
 };