]> granicus.if.org Git - clang/commit
Prefer not to break after assignments.
authorDaniel Jasper <djasper@google.com>
Mon, 7 Jan 2013 13:08:40 +0000 (13:08 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 7 Jan 2013 13:08:40 +0000 (13:08 +0000)
commit9cda8000434be3360abb38fe1690fa24ae3d48be
treeef5fb5b44cfe96eccec46d250151bc9bbcb70259
parent7ad4effaa96905ef9dbc3815760b06b1d1639390
Prefer not to break after assignments.

This addresses llvm.org/PR14830.

Before:
unsigned Cost =
    TTI.getMemoryOpCost(I->getOpcode(), VectorTy, SI->getAlignment(),
                        SI->getPointerAddressSpace());
CharSourceRange LineRange =
    CharSourceRange::getTokenRange(TheLine.Tokens.front().Tok.getLocation(),
                                   TheLine.Tokens.back().Tok.getLocation());

After:
unsigned Cost = TTI.getMemoryOpCost(I->getOpcode(), VectorTy,
                                    SI->getAlignment(),
                                    SI->getPointerAddressSpace());
CharSourceRange LineRange = CharSourceRange::getTokenRange(
                                TheLine.Tokens.front().Tok.getLocation(),
                                TheLine.Tokens.back().Tok.getLocation());

This required rudimentary changes to static initializer lists, but we
are not yet formatting them in a reasonable way. That will be done in a
subsequent patch.

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