]> granicus.if.org Git - clang/commitdiff
Add setter method PreprocessorLexer::setParsingPreprocessorDirective(). This will...
authorTed Kremenek <kremenek@apple.com>
Wed, 26 Nov 2008 00:57:02 +0000 (00:57 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 26 Nov 2008 00:57:02 +0000 (00:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60070 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/PreprocessorLexer.h

index 1bf60bbdbe8a4824fee34f6a3b3b91bd584b93ea..e178d27374c501f8790480af8786e180a9a3bb67 100644 (file)
@@ -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; }