gecko-dev/build/build-clang/clang-tidy-ci.patch
Andi-Bogdan Postelnicu 56a9802f89 Bug 1625884 - move clang-tidy and clang-format to clang-10. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D70065

--HG--
extra : moz-landing-system : lando
2020-04-09 14:16:44 +00:00

27 lines
1.2 KiB
Diff

diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index 40aaf402ec0..2184d51c643 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -410,6 +410,7 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
for (auto &Check : Checks) {
Check->registerMatchers(&*Finder);
+ Check->registerPPCallbacks(Compiler);
Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP);
}
diff --git a/clang-tools-extra/clang-tidy/ClangTidyCheck.h b/clang-tools-extra/clang-tidy/ClangTidyCheck.h
index 1ad881f673a..59982bd377e 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyCheck.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyCheck.h
@@ -53,6 +53,9 @@ public:
/// constructor using the Options.get() methods below.
ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context);
+ /// This has been deprecated in clang 9 - needed by mozilla-must-override
+ virtual void registerPPCallbacks(CompilerInstance &Compiler) {}
+
/// Override this to register ``PPCallbacks`` in the preprocessor.
///
/// This should be used for clang-tidy checks that analyze preprocessor-