]> granicus.if.org Git - clang/commitdiff
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 24 Aug 2008 12:29:43 +0000 (12:29 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sun, 24 Aug 2008 12:29:43 +0000 (12:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/Preprocessor.h
lib/Lex/PPCaching.cpp

index fe05b07eebedffc4d2bcf72fde2baa5432786222..cc056ead5d16359134f778ea5b148e833ae9618d 100644 (file)
@@ -277,22 +277,22 @@ public:
   void RemoveTopOfLexerStack();
 
   /// EnableBacktrackAtThisPos - From the point that this method is called, and
-  /// until DisableBacktrack() or Backtrack() is called, the Preprocessor keeps
-  /// track of the lexed tokens so that a subsequent Backtrack() call will make
-  /// the Preprocessor re-lex the same tokens.
+  /// until CommitBacktrackedTokens() or Backtrack() is called, the Preprocessor
+  /// keeps track of the lexed tokens so that a subsequent Backtrack() call will
+  /// make the Preprocessor re-lex the same tokens.
   ///
   /// Nested backtracks are allowed, meaning that EnableBacktrackAtThisPos can
-  /// be called multiple times and DisableBacktrack/Backtrack calls will be
-  /// combined with the EnableBacktrackAtThisPos calls in reverse order.
+  /// be called multiple times and CommitBacktrackedTokens/Backtrack calls will
+  /// be combined with the EnableBacktrackAtThisPos calls in reverse order.
   ///
-  /// NOTE: *DO NOT* forget to call either DisableBacktrack() or Backtrack() at
-  /// some point after EnableBacktrackAtThisPos. If you don't, caching of tokens
-  /// will continue indefinitely.
+  /// NOTE: *DO NOT* forget to call either CommitBacktrackedTokens or Backtrack
+  /// at some point after EnableBacktrackAtThisPos. If you don't, caching of
+  /// tokens will continue indefinitely.
   ///
   void EnableBacktrackAtThisPos();
 
-  /// DisableBacktrack - Disable the last EnableBacktrackAtThisPos() call.
-  void DisableBacktrack();
+  /// CommitBacktrackedTokens - Disable the last EnableBacktrackAtThisPos call.
+  void CommitBacktrackedTokens();
 
   /// Backtrack - Make Preprocessor re-lex the tokens that were lexed since
   /// EnableBacktrackAtThisPos() was previously called. 
index 5bed51eaa4020b6f154fde7b3738cdce8463a2f7..7ba5e45afabbf44289a4feca3ed051bf893d207d 100644 (file)
 #include "clang/Lex/Preprocessor.h"
 using namespace clang;
 
-/// EnableBacktrackAtThisPos - From the point that this method is called, and
-/// until DisableBacktrack() or Backtrack() is called, the Preprocessor keeps
-/// track of the lexed tokens so that a subsequent Backtrack() call will make
-/// the Preprocessor re-lex the same tokens.
-///
-/// Nested backtracks are allowed, meaning that EnableBacktrackAtThisPos can
-/// be called multiple times and DisableBacktrack/Backtrack calls will be
-/// combined with the EnableBacktrackAtThisPos calls in reverse order.
+/// EnableBacktrackAtThisPos - From the point that this method is called, and\r
+/// until CommitBacktrackedTokens() or Backtrack() is called, the Preprocessor\r
+/// keeps track of the lexed tokens so that a subsequent Backtrack() call will\r
+/// make the Preprocessor re-lex the same tokens.\r
+///\r
+/// Nested backtracks are allowed, meaning that EnableBacktrackAtThisPos can\r
+/// be called multiple times and CommitBacktrackedTokens/Backtrack calls will\r
+/// be combined with the EnableBacktrackAtThisPos calls in reverse order.\r
 void Preprocessor::EnableBacktrackAtThisPos() {
   CacheTokens = true;
   BacktrackPositions.push_back(CachedLexPos);
   EnterCachingLexMode();
 }
 
-/// DisableBacktrack - Disable the last EnableBacktrackAtThisPos() call.
-void Preprocessor::DisableBacktrack() {
+/// CommitBacktrackedTokens - Disable the last EnableBacktrackAtThisPos call.
+void Preprocessor::CommitBacktrackedTokens() {
   assert(!BacktrackPositions.empty()
          && "EnableBacktrackAtThisPos was not called!");
   BacktrackPositions.pop_back();