aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/CommentLexer.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-06-27 23:28:29 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-06-27 23:28:29 +0000
commit5676d32a23faf0506f5c295980c2876c862488d5 (patch)
tree042622f2e745a376889a7d63aa2dfa8576382bcd /lib/AST/CommentLexer.cpp
parent8771872ab78fe4bd65393f94f2b1b6eb8b4ec6d3 (diff)
Fix an infinite loop in comment lexer: we were not advancing in the input character stream when we saw a '<' that is not a start of an HTML tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentLexer.cpp')
-rw-r--r--lib/AST/CommentLexer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/CommentLexer.cpp b/lib/AST/CommentLexer.cpp
index 0b76050ff0..c3a801d924 100644
--- a/lib/AST/CommentLexer.cpp
+++ b/lib/AST/CommentLexer.cpp
@@ -357,6 +357,11 @@ void Lexer::lexCommentText(Token &T) {
setupAndLexHTMLOpenTag(T);
else if (C == '/')
lexHTMLCloseTag(T);
+ else {
+ StringRef Text(BufferPtr, TokenPtr - BufferPtr);
+ formTokenWithChars(T, TokenPtr, tok::text);
+ T.setText(Text);
+ }
return;
}