From a78c249af6bed83854d28449c4763ad1fd22806e Mon Sep 17 00:00:00 2001 From: Jonas Toth Date: Fri, 5 Oct 2018 14:15:19 +0000 Subject: [clang-tidy] NFC refactor lexer-utils to be usable without ASTContext Summary: This patch is a small refactoring necessary for 'readability-isolate-declaration' and does not introduce functional changes. It allows to use the utility functions without a full `ASTContext` and requires only the `SourceManager` and the `LangOpts`. Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52684 llvm-svn: 343850 --- clang-tools-extra/clang-tidy/utils/LexerUtils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang-tools-extra/clang-tidy/utils/LexerUtils.h') diff --git a/clang-tools-extra/clang-tidy/utils/LexerUtils.h b/clang-tools-extra/clang-tidy/utils/LexerUtils.h index f7bcd6f63d2..0eb5e56ef64 100644 --- a/clang-tools-extra/clang-tidy/utils/LexerUtils.h +++ b/clang-tools-extra/clang-tidy/utils/LexerUtils.h @@ -19,8 +19,8 @@ namespace utils { namespace lexer { /// Returns previous token or ``tok::unknown`` if not found. -Token getPreviousToken(const ASTContext &Context, SourceLocation Location, - bool SkipComments = true); +Token getPreviousToken(SourceLocation Location, const SourceManager &SM, + const LangOptions &LangOpts, bool SkipComments = true); } // namespace lexer } // namespace utils -- cgit v1.2.3