From c3b054d250cdca485c71845089c316e10610ebad Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 26 Feb 2011 22:09:03 +0000 Subject: Vendor import of clang trunk r126547: http://llvm.org/svn/llvm-project/cfe/trunk@126547 --- lib/Lex/TokenLexer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Lex/TokenLexer.cpp') diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index ea39b47904b02..caa44bf4a1467 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -543,6 +543,11 @@ unsigned TokenLexer::isNextTokenLParen() const { return Tokens[CurToken].is(tok::l_paren); } +/// isParsingPreprocessorDirective - Return true if we are in the middle of a +/// preprocessor directive. +bool TokenLexer::isParsingPreprocessorDirective() const { + return Tokens[NumTokens-1].is(tok::eom) && !isAtEnd(); +} /// HandleMicrosoftCommentPaste - In microsoft compatibility mode, /##/ pastes /// together to form a comment that comments out everything in the current -- cgit v1.2.3