[cfe-commits] r58311 - /cfe/trunk/include/clang/Lex/TokenLexer.h

Chris Lattner sabre at nondot.org
Mon Oct 27 18:02:17 PDT 2008


Author: lattner
Date: Mon Oct 27 20:02:17 2008
New Revision: 58311

URL: http://llvm.org/viewvc/llvm-project?rev=58311&view=rev
Log:
clarify comment, rename argument to avoid a subtle conflict
with an ivar that wasn't a bug but was confusing.

Modified:
    cfe/trunk/include/clang/Lex/TokenLexer.h

Modified: cfe/trunk/include/clang/Lex/TokenLexer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/TokenLexer.h?rev=58311&r1=58310&r2=58311&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/TokenLexer.h (original)
+++ cfe/trunk/include/clang/Lex/TokenLexer.h Mon Oct 27 20:02:17 2008
@@ -87,12 +87,13 @@
   /// ownership of the ActualArgs pointer.
   void Init(Token &Tok, MacroArgs *ActualArgs);
   
-  /// Create a TokenLexer for the specified token stream.  This does not
-  /// take ownership of the specified token vector.
+  /// Create a TokenLexer for the specified token stream.  If 'OwnsTokens' is
+  /// specified, this takes ownership of the tokens and delete[]'s them when
+  /// the token lexer is empty.
   TokenLexer(const Token *TokArray, unsigned NumToks, bool DisableExpansion,
-             bool OwnsTokens, Preprocessor &pp)
+             bool ownsTokens, Preprocessor &pp)
     : Macro(0), ActualArgs(0), PP(pp), OwnsTokens(false) {
-    Init(TokArray, NumToks, DisableExpansion, OwnsTokens);
+    Init(TokArray, NumToks, DisableExpansion, ownsTokens);
   }
   
   /// Init - Initialize this TokenLexer with the specified token stream.





More information about the cfe-commits mailing list