This revision was automatically updated to reflect the committed changes. Closed by commit rGd5106c8f973b: [clangd] NFC: Cleanup IncludeCleaner API (authored by kbobyrev).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119842/new/ https://reviews.llvm.org/D119842 Files: clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-extra/clangd/IncludeCleaner.h Index: clang-tools-extra/clangd/IncludeCleaner.h =================================================================== --- clang-tools-extra/clangd/IncludeCleaner.h +++ clang-tools-extra/clangd/IncludeCleaner.h @@ -51,8 +51,7 @@ /// - don't attempt to describe where symbols were referenced from in /// ambiguous cases (e.g. implicitly used symbols, multiple declarations) /// - err on the side of reporting all possible locations -ReferencedLocations findReferencedLocations(const SourceManager &SM, - ASTContext &Ctx, Preprocessor &PP, +ReferencedLocations findReferencedLocations(ASTContext &Ctx, Preprocessor &PP, const syntax::TokenBuffer *Tokens); ReferencedLocations findReferencedLocations(ParsedAST &AST); Index: clang-tools-extra/clangd/IncludeCleaner.cpp =================================================================== --- clang-tools-extra/clangd/IncludeCleaner.cpp +++ clang-tools-extra/clangd/IncludeCleaner.cpp @@ -286,11 +286,11 @@ } // namespace -ReferencedLocations findReferencedLocations(const SourceManager &SM, - ASTContext &Ctx, Preprocessor &PP, +ReferencedLocations findReferencedLocations(ASTContext &Ctx, Preprocessor &PP, const syntax::TokenBuffer *Tokens) { trace::Span Tracer("IncludeCleaner::findReferencedLocations"); ReferencedLocations Result; + const auto &SM = Ctx.getSourceManager(); ReferencedLocationCrawler Crawler(Result, SM); Crawler.TraverseAST(Ctx); if (Tokens) @@ -299,8 +299,8 @@ } ReferencedLocations findReferencedLocations(ParsedAST &AST) { - return findReferencedLocations(AST.getSourceManager(), AST.getASTContext(), - AST.getPreprocessor(), &AST.getTokens()); + return findReferencedLocations(AST.getASTContext(), AST.getPreprocessor(), + &AST.getTokens()); } ReferencedFiles
Index: clang-tools-extra/clangd/IncludeCleaner.h =================================================================== --- clang-tools-extra/clangd/IncludeCleaner.h +++ clang-tools-extra/clangd/IncludeCleaner.h @@ -51,8 +51,7 @@ /// - don't attempt to describe where symbols were referenced from in /// ambiguous cases (e.g. implicitly used symbols, multiple declarations) /// - err on the side of reporting all possible locations -ReferencedLocations findReferencedLocations(const SourceManager &SM, - ASTContext &Ctx, Preprocessor &PP, +ReferencedLocations findReferencedLocations(ASTContext &Ctx, Preprocessor &PP, const syntax::TokenBuffer *Tokens); ReferencedLocations findReferencedLocations(ParsedAST &AST); Index: clang-tools-extra/clangd/IncludeCleaner.cpp =================================================================== --- clang-tools-extra/clangd/IncludeCleaner.cpp +++ clang-tools-extra/clangd/IncludeCleaner.cpp @@ -286,11 +286,11 @@ } // namespace -ReferencedLocations findReferencedLocations(const SourceManager &SM, - ASTContext &Ctx, Preprocessor &PP, +ReferencedLocations findReferencedLocations(ASTContext &Ctx, Preprocessor &PP, const syntax::TokenBuffer *Tokens) { trace::Span Tracer("IncludeCleaner::findReferencedLocations"); ReferencedLocations Result; + const auto &SM = Ctx.getSourceManager(); ReferencedLocationCrawler Crawler(Result, SM); Crawler.TraverseAST(Ctx); if (Tokens) @@ -299,8 +299,8 @@ } ReferencedLocations findReferencedLocations(ParsedAST &AST) { - return findReferencedLocations(AST.getSourceManager(), AST.getASTContext(), - AST.getPreprocessor(), &AST.getTokens()); + return findReferencedLocations(AST.getASTContext(), AST.getPreprocessor(), + &AST.getTokens()); } ReferencedFiles
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits