Comment parsing: fix an assertion failure on a verbatim block terminated with "**/"

llvm-svn: 235057
This commit is contained in:
Dmitri Gribenko 2015-04-15 23:45:43 +00:00
parent b4b8bb72cb
commit 8b7206250f
2 changed files with 12 additions and 0 deletions

View File

@ -514,6 +514,12 @@ void Lexer::lexVerbatimBlockBody(Token &T) {
if (CommentState == LCS_InsideCComment)
skipLineStartingDecorations();
if (BufferPtr == CommentEnd) {
formTokenWithChars(T, BufferPtr, tok::verbatim_block_line);
T.setVerbatimBlockText("");
return;
}
lexVerbatimBlockFirstLine(T);
}

View File

@ -1038,6 +1038,12 @@ int test_nocrash12();
///@param x@param y
int test_nocrash13(int x, int y);
/**
* \verbatim
* Aaa
**/
int test_nocrash14();
// rdar://12379114
// expected-warning@+2 {{'@union' command should not be used in a comment attached to a non-union declaration}}
/*!