mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
56a9802f89
Differential Revision: https://phabricator.services.mozilla.com/D70065 --HG-- extra : moz-landing-system : lando
27 lines
1.2 KiB
Diff
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-
|