summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit632d58afaba61b09df80f376215342f6c81f1026 (patch)
tree85886af3d761b1e15346c6284b52ac60caa49293 /clang/lib
parentef40238a0e419a75fd2b911321a8780532ac0adf (diff)
downloadbcm5719-llvm-632d58afaba61b09df80f376215342f6c81f1026.tar.gz
bcm5719-llvm-632d58afaba61b09df80f376215342f6c81f1026.zip
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.
llvm-svn: 159303
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/CommentLexer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp
index 0b76050ff0b..c3a801d924c 100644
--- a/clang/lib/AST/CommentLexer.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud