]> granicus.if.org Git - clang/commit
Disable tab expansion when counting the columns in block comments.
authorManuel Klimek <klimek@google.com>
Tue, 28 May 2013 10:01:59 +0000 (10:01 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 28 May 2013 10:01:59 +0000 (10:01 +0000)
commitd63312b1484a4642225c97e1dd013fe520b2b9a4
treec687eebe22070304651e365a14f2d0180b14c040
parentc5cc4bf2699b0542f352738f84eee373cfcf670f
Disable tab expansion when counting the columns in block comments.

To fully support this, we also need to expand tabs in the text before
the block comment. This patch breaks indentation when there was a
non-standard mixture of spaces and tabs used for indentation, but
fixes a regression in the simple case:
{
  /*
   * Comment.
   */
  int i;
}
Is now formatted correctly, if there were tabs used for indentation
before.

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