From 1c85d5b17d0bd4b688e6fd4a59ad9c6dc4a817a6 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Tue, 24 Jul 2012 16:10:47 +0000 Subject: Comment parsing: retokenized text tokens are now pushed back in correct (not reverse) order llvm-svn: 160675 --- clang/lib/AST/CommentParser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'clang/lib/AST/CommentParser.cpp') diff --git a/clang/lib/AST/CommentParser.cpp b/clang/lib/AST/CommentParser.cpp index 6b7e0ab49d4..92ea7042ff1 100644 --- a/clang/lib/AST/CommentParser.cpp +++ b/clang/lib/AST/CommentParser.cpp @@ -105,9 +105,12 @@ BlockCommandComment *Parser::parseBlockCommand() { BC = parseBlockCommandArgs(BC, Retokenizer, NumArgs); // Put back tokens we didn't use. + SmallVector TextToks; Token Text; - while (Retokenizer.lexText(Text)) - putBack(Text); + while (Retokenizer.lexText(Text)) { + TextToks.push_back(Text); + } + putBack(TextToks); } BlockContentComment *Block = parseParagraphOrBlockCommand(); -- cgit v1.2.3