[PATCH] D63784: [clang-tidy] Fix ClangTidyTest to initialize context before checks.
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 02:54:54 PDT 2019
gribozavr accepted this revision.
gribozavr added a comment.
Good catch!
================
Comment at: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h:48
+
+template <typename... CheckList>
class TestClangTidyAction : public ASTFrontendAction {
----------------
"CheckTypes"? 'cause "Checks" below is also technically a "check list".
================
Comment at: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h:65
+
+ // Checks must be created here, *after* `Context` has been initialized.
+ CheckFactory<CheckList...>::createChecks(&Context, Checks);
----------------
Please explain why ("so that check constructors can access the context")
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63784/new/
https://reviews.llvm.org/D63784
More information about the cfe-commits
mailing list