]> granicus.if.org Git - clang/commit
Fix for corner cases in code handling leading "* " decorations in block comments
authorAlexander Kornienko <alexfh@google.com>
Mon, 8 Jul 2013 14:12:07 +0000 (14:12 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 8 Jul 2013 14:12:07 +0000 (14:12 +0000)
commit1659dedac63858de50ee60175a88c42ff974e61b
tree417ca6979b1e415153a67c85774b6d0b2fa37155
parent80747a834cf8b0304b314ede9aba3d6ddb8e9520
Fix for corner cases in code handling leading "* " decorations in block comments

Summary:
Fixes problems that lead to incorrect formatting of these and similar snippets:
/*
 **
 */

/*
 **/

/*
 * */

/*
 *test
 */

Clang-format used to think that all the cases above use "* " decoration, and
failed to calculate insertion position properly. It also used to remove leading
"* " in the last line.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1113

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185818 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/BreakableToken.cpp
lib/Format/BreakableToken.h
unittests/Format/FormatTest.cpp