clang-tools  3.8.0
LexerUtils.h
Go to the documentation of this file.
1 //===--- LexerUtils.h - clang-tidy-------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_LEXER_UTILS_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_LEXER_UTILS_H
12 
13 #include "clang/AST/ASTContext.h"
14 #include "clang/Lex/Lexer.h"
15 
16 namespace clang {
17 namespace tidy {
18 namespace lexer_utils {
19 
20 // Returns previous non-comment token skipping over any comment text or
21 // tok::unknown if not found.
22 Token getPreviousNonCommentToken(const ASTContext &Context,
23  SourceLocation Location);
24 
25 } // namespace lexer_utils
26 } // namespace tidy
27 } // namespace clang
28 
29 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_LEXER_UTILS_H
Token getPreviousNonCommentToken(const ASTContext &Context, SourceLocation Location)
Definition: LexerUtils.cpp:16
ClangTidyContext & Context
Definition: ClangTidy.cpp:93