aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentParser.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-07-24 16:10:47 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-07-24 16:10:47 +0000
commitfd939162ff99a0084ed22a08dd37c149a0883a2b (patch)
tree7158d0914e86a8b1bdaf6b853bb062dcc6a85fb5 /lib/AST/CommentParser.cpp
parent9f17408d50c1d76c5eab435e4ceb924cc10757ab (diff)
Comment parsing: retokenized text tokens are now pushed back in correct (not
reverse) order git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentParser.cpp')
-rw-r--r--lib/AST/CommentParser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/AST/CommentParser.cpp b/lib/AST/CommentParser.cpp
index 6b7e0ab49d..92ea7042ff 100644
--- a/lib/AST/CommentParser.cpp
+++ b/lib/AST/CommentParser.cpp
@@ -105,9 +105,12 @@ BlockCommandComment *Parser::parseBlockCommand() {
BC = parseBlockCommandArgs(BC, Retokenizer, NumArgs);
// Put back tokens we didn't use.
+ SmallVector<Token, 16> TextToks;
Token Text;
- while (Retokenizer.lexText(Text))
- putBack(Text);
+ while (Retokenizer.lexText(Text)) {
+ TextToks.push_back(Text);
+ }
+ putBack(TextToks);
}
BlockContentComment *Block = parseParagraphOrBlockCommand();