diff options
| author | Jonas Toth <jonas.toth@gmail.com> | 2018-10-05 14:15:19 +0000 |
|---|---|---|
| committer | Jonas Toth <jonas.toth@gmail.com> | 2018-10-05 14:15:19 +0000 |
| commit | a78c249af6bed83854d28449c4763ad1fd22806e (patch) | |
| tree | fae17e5712cadc974836eda0c0a04af8dc49f151 /clang-tools-extra/clang-tidy/utils/LexerUtils.h | |
| parent | 5fb9746c49d60a51c95a3ffcb183531a64c2ffb8 (diff) | |
| download | bcm5719-llvm-a78c249af6bed83854d28449c4763ad1fd22806e.tar.gz bcm5719-llvm-a78c249af6bed83854d28449c4763ad1fd22806e.zip | |
[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
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/LexerUtils.h')
| -rw-r--r-- | clang-tools-extra/clang-tidy/utils/LexerUtils.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 |

