summaryrefslogtreecommitdiffstats
path: root/clang/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
commit1c85d5b17d0bd4b688e6fd4a59ad9c6dc4a817a6 (patch)
tree8802e3ba0c749c7d9db109beb37ebbfe2c1577dc /clang/lib/AST/CommentParser.cpp
parent86f8bbced497389de5d35f0d6728ad9d846347b4 (diff)
downloadbcm5719-llvm-1c85d5b17d0bd4b688e6fd4a59ad9c6dc4a817a6.tar.gz
bcm5719-llvm-1c85d5b17d0bd4b688e6fd4a59ad9c6dc4a817a6.zip
Comment parsing: retokenized text tokens are now pushed back in correct (not
reverse) order llvm-svn: 160675
Diffstat (limited to 'clang/lib/AST/CommentParser.cpp')
-rw-r--r--clang/lib/AST/CommentParser.cpp7
1 files changed, 5 insertions, 2 deletions
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<Token, 16> TextToks;
Token Text;
- while (Retokenizer.lexText(Text))
- putBack(Text);
+ while (Retokenizer.lexText(Text)) {
+ TextToks.push_back(Text);
+ }
+ putBack(TextToks);
}
BlockContentComment *Block = parseParagraphOrBlockCommand();
OpenPOWER on IntegriCloud