]> granicus.if.org Git - clang/commitdiff
rename HandleEndOfMacro -> HandleEndOfTokenLexer
authorChris Lattner <sabre@nondot.org>
Sun, 9 Mar 2008 03:04:16 +0000 (03:04 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 9 Mar 2008 03:04:16 +0000 (03:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48076 91177308-0d34-0410-b5e6-96231b3b80d8

Lex/Preprocessor.cpp
Lex/TokenLexer.cpp
include/clang/Lex/Preprocessor.h

index d8865441b0a2e5c882cfe8b3c2fbbff25af5c8a7..16abbc5fe896dfe992436639c2755cfc2a89e974 100644 (file)
@@ -1333,9 +1333,9 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
   return true;
 }
 
-/// HandleEndOfMacro - This callback is invoked when the lexer hits the end of
-/// the current macro expansion or token stream expansion.
-bool Preprocessor::HandleEndOfMacro(Token &Result) {
+/// HandleEndOfTokenLexer - This callback is invoked when the current TokenLexer
+/// hits the end of its token stream.
+bool Preprocessor::HandleEndOfTokenLexer(Token &Result) {
   assert(CurTokenLexer && !CurLexer &&
          "Ending a macro when currently in a #include file!");
 
@@ -1382,7 +1382,7 @@ void Preprocessor::HandleMicrosoftCommentPaste(Token &Tok) {
   // Okay, we either found and switched over the lexer, or we didn't find a
   // lexer.  In either case, finish off the macro the comment came from, getting
   // the next token.
-  if (!HandleEndOfMacro(Tok)) Lex(Tok);
+  if (!HandleEndOfTokenLexer(Tok)) Lex(Tok);
   
   // Discarding comments as long as we don't have EOF or EOM.  This 'comments
   // out' the rest of the line, including any tokens that came from other macros
index 2a5d6c5cf52d72152bc3309628bc033d64eae813..c91b753b6a6c56f2fef33c59b623577f07bc9888 100644 (file)
@@ -281,11 +281,11 @@ void TokenLexer::Lex(Token &Tok) {
     // Pop this context off the preprocessors lexer stack and get the next
     // token.  This will delete "this" so remember the PP instance var.
     Preprocessor &PPCache = PP;
-    if (PP.HandleEndOfMacro(Tok))
+    if (PP.HandleEndOfTokenLexer(Tok))
       return;
 
-    // HandleEndOfMacro may not return a token.  If it doesn't, lex whatever is
-    // next.
+    // HandleEndOfTokenLexer may not return a token.  If it doesn't, lex
+    // whatever is next.
     return PPCache.Lex(Tok);
   }
   
index c11e547b5df9ade2628920dceeea0816877aa97b..fd12946a461ae9fdd3b4662d179751305caf8fb2 100644 (file)
@@ -360,10 +360,9 @@ public:
   /// client should call lex again.
   bool HandleEndOfFile(Token &Result, bool isEndOfMacro = false);
   
-  /// HandleEndOfMacro - This callback is invoked when the lexer hits the end of
-  /// the current macro line.  It returns true if Result is filled in with a
-  /// token, or false if Lex should be called again.
-  bool HandleEndOfMacro(Token &Result);
+  /// HandleEndOfTokenLexer - This callback is invoked when the current
+  /// TokenLexer hits the end of its token stream.
+  bool HandleEndOfTokenLexer(Token &Result);
   
   /// HandleDirective - This callback is invoked when the lexer sees a # token
   /// at the start of a line.  This consumes the directive, modifies the