зеркало из https://github.com/mozilla/gecko-dev.git
27 строки
1.1 KiB
Diff
27 строки
1.1 KiB
Diff
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
|
|
index d6913dfd3c07..d031a163fdd7 100644
|
|
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
|
|
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
|
|
@@ -418,6 +418,7 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
|
|
if (!Check->isLanguageVersionSupported(Context.getLangOpts()))
|
|
continue;
|
|
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 54b725126752..200780e86804 100644
|
|
--- a/clang-tools-extra/clang-tidy/ClangTidyCheck.h
|
|
+++ b/clang-tools-extra/clang-tidy/ClangTidyCheck.h
|
|
@@ -130,6 +130,9 @@ public:
|
|
return true;
|
|
}
|
|
|
|
+ /// 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-
|