From 63db2a78010f4d0f7a6783ea1e2d1469c9b154ad Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 26 Nov 2008 00:57:02 +0000 Subject: [PATCH] Add setter method PreprocessorLexer::setParsingPreprocessorDirective(). This will be used by the mechanism to generate cached tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60070 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Lex/PreprocessorLexer.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index 1bf60bbdbe..e178d27374 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -116,6 +116,8 @@ protected: } unsigned getConditionalStackDepth() const { return ConditionalStack.size(); } + +public: //===--------------------------------------------------------------------===// // Misc. lexing methods. @@ -125,7 +127,11 @@ protected: /// lexically legal, emit a diagnostic and return a result EOM token. void LexIncludeFilename(Token &Result); -public: + /// setParsingPreprocessorDirective - Inform the lexer whether or not + /// we are currently lexing a preprocessor directive. + void setParsingPreprocessorDirective(bool f) { + ParsingPreprocessorDirective = f; + } /// isLexingRawMode - Return true if this lexer is in raw mode or not. bool isLexingRawMode() const { return LexingRawMode; } -- 2.40.0