Fix handling of fake parenthesis during formatting.
authorDaniel Jasper <djasper@google.com>
Fri, 8 Feb 2013 16:49:27 +0000 (16:49 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 8 Feb 2013 16:49:27 +0000 (16:49 +0000)
commit8360a86c8c7a123705e7b3a078f8b5f26d6ed3ee
treecd34dbc53b7478fe1f34076f4cead2da54f8e2a6
parenta6016e4351ca88eceef7133fd3d6ae8a9241f8f3
Fix handling of fake parenthesis during formatting.

They are much easier to handle when attached to the previous token.

Before:
unsigned Indent =
    formatFirstToken(TheLine.First, IndentForLevel[TheLine.Level] >=
                                    0 ? IndentForLevel[TheLine.Level]
: TheLine.Level * 2, TheLine.InPPDirective, PreviousEndOfLineColumn);

After:
unsigned Indent = formatFirstToken(
    TheLine.First, IndentForLevel[TheLine.Level] >= 0
                       ? IndentForLevel[TheLine.Level] : TheLine.Level * 2,
    TheLine.InPPDirective, PreviousEndOfLineColumn);

llvm-svn: 174718
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/TokenAnnotator.h
clang/unittests/Format/FormatTest.cpp