[PATCH] D138566: [clang-tidy][NFC] Make CheckFactories::CreateChecks* const
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 12 11:21:18 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb616811dde41: [clang-tidy][NFC] Make CheckFactories::CreateChecks* const (authored by njames93).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138566/new/
https://reviews.llvm.org/D138566
Files:
clang-tools-extra/clang-tidy/ClangTidyModule.cpp
clang-tools-extra/clang-tidy/ClangTidyModule.h
Index: clang-tools-extra/clang-tidy/ClangTidyModule.h
===================================================================
--- clang-tools-extra/clang-tidy/ClangTidyModule.h
+++ clang-tools-extra/clang-tidy/ClangTidyModule.h
@@ -65,11 +65,11 @@
/// Create instances of checks that are enabled.
std::vector<std::unique_ptr<ClangTidyCheck>>
- createChecks(ClangTidyContext *Context);
+ createChecks(ClangTidyContext *Context) const;
/// Create instances of checks that are enabled for the current Language.
std::vector<std::unique_ptr<ClangTidyCheck>>
- createChecksForLanguage(ClangTidyContext *Context);
+ createChecksForLanguage(ClangTidyContext *Context) const;
typedef llvm::StringMap<CheckFactory> FactoryMap;
FactoryMap::const_iterator begin() const { return Factories.begin(); }
Index: clang-tools-extra/clang-tidy/ClangTidyModule.cpp
===================================================================
--- clang-tools-extra/clang-tidy/ClangTidyModule.cpp
+++ clang-tools-extra/clang-tidy/ClangTidyModule.cpp
@@ -22,7 +22,7 @@
}
std::vector<std::unique_ptr<ClangTidyCheck>>
-ClangTidyCheckFactories::createChecks(ClangTidyContext *Context) {
+ClangTidyCheckFactories::createChecks(ClangTidyContext *Context) const {
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
for (const auto &Factory : Factories) {
if (Context->isCheckEnabled(Factory.getKey()))
@@ -32,7 +32,8 @@
}
std::vector<std::unique_ptr<ClangTidyCheck>>
-ClangTidyCheckFactories::createChecksForLanguage(ClangTidyContext *Context) {
+ClangTidyCheckFactories::createChecksForLanguage(
+ ClangTidyContext *Context) const {
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
const LangOptions &LO = Context->getLangOpts();
for (const auto &Factory : Factories) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138566.488726.patch
Type: text/x-patch
Size: 1793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230112/c34aaf4e/attachment.bin>
More information about the cfe-commits
mailing list