mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
5392090016
In the future we should re-write this checker but for now this solution is acceptable. Differential Revision: https://phabricator.services.mozilla.com/D51242 --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 1d813d65f8d..5ef2e6fe9cd 100644
|
|
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
|
|
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
|
|
@@ -407,6 +407,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 3064a41caa1..9c7eb4815c4 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) {}
|
|
+
|
|
/// \brief Override this to register ``PPCallbacks`` in the preprocessor.
|
|
///
|
|
/// This should be used for clang-tidy checks that analyze preprocessor-
|