This revision was automatically updated to reflect the committed changes. Closed by commit rCTE346219: [clang-tidy] run() doesn't update the SourceManager. (authored by sammccall, committed by ).
Changed prior to commit: https://reviews.llvm.org/D54061?vs=172471&id=172719#toc Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54061 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp =================================================================== --- clang-tidy/ClangTidy.cpp +++ clang-tidy/ClangTidy.cpp @@ -441,7 +441,9 @@ } void ClangTidyCheck::run(const ast_matchers::MatchFinder::MatchResult &Result) { - Context->setSourceManager(Result.SourceManager); + // For historical reasons, checks don't implement the MatchFinder run() + // callback directly. We keep the run()/check() distinction to avoid interface + // churn, and to allow us to add cross-cutting logic in the future. check(Result); }
Index: clang-tidy/ClangTidy.cpp =================================================================== --- clang-tidy/ClangTidy.cpp +++ clang-tidy/ClangTidy.cpp @@ -441,7 +441,9 @@ } void ClangTidyCheck::run(const ast_matchers::MatchFinder::MatchResult &Result) { - Context->setSourceManager(Result.SourceManager); + // For historical reasons, checks don't implement the MatchFinder run() + // callback directly. We keep the run()/check() distinction to avoid interface + // churn, and to allow us to add cross-cutting logic in the future. check(Result); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits