hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land.
The change looks reasonable to me. In https://reviews.llvm.org/D54061#1286505, @steveire wrote: > After this change, it seems that `ClangTidyCheck::check` is not needed and > all callers should be ported to call `run()` instead (and the private `run()` > declaration should be removed from `ClangTidyCheck`. Theoretically, we could replace `ClangTidyCheck::check` with `ClangTidyCheck::run`, but I'm not sure it is worth, `ClangTidyCheck::check` is a public API, and is widely-used (for all clang-tidy checks), replacing it requires large changes (although it is one-line change), it might break downstream clang-tidy checks. ================ Comment at: clang-tidy/ClangTidy.cpp:444 void ClangTidyCheck::run(const ast_matchers::MatchFinder::MatchResult &Result) { - Context->setSourceManager(Result.SourceManager); check(Result); ---------------- I'd add an assertion `assert(Context->hasSourceManager())`, but it turns out ClangTidyContext doesn't provide this method... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54061 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits