From a4c2414404bd7fc08f467dcfb3d980fe46ee8861 Mon Sep 17 00:00:00 2001 From: David Major Date: Mon, 6 Jul 2020 16:31:17 +0000 Subject: [PATCH] Bug 1650804 - Update clang-tidy code for new ClangTidyCheck.h header in recent clangs r=static-analysis-reviewers,andi In https://github.com/llvm/llvm-project/commit/e9087fe75c8652a442bada0a7e02cba0df781074, the definition of ClangTidyCheck moved into a new header ClangTidyCheck.h. And later, in https://github.com/llvm/llvm-project/commit/860aefd0784ed05ffc0d56f36b0d56009776002a, ClangTidyCheck.h is no longer automatically included from ClangTidy.h. Differential Revision: https://phabricator.services.mozilla.com/D82392 --- build/clang-plugin/plugin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/clang-plugin/plugin.h b/build/clang-plugin/plugin.h index abbd5d3d1eab..15e7560455d9 100644 --- a/build/clang-plugin/plugin.h +++ b/build/clang-plugin/plugin.h @@ -43,7 +43,11 @@ typedef ASTConsumer *ASTConsumerPtr; // source compatible base check class called BaseCheck, and we use the // preprocessor to decide which base class to pick. #ifdef CLANG_TIDY +#if CLANG_VERSION_FULL >= 900 +#include "../ClangTidyCheck.h" +#else #include "../ClangTidy.h" +#endif typedef clang::tidy::ClangTidyCheck BaseCheck; typedef clang::tidy::ClangTidyContext ContextType; #else