summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-23 15:55:19 +0000
committerDaniel Jasper <djasper@google.com>2013-01-23 15:55:19 +0000
commit1565eb3e381161924c96884c3bbc64bea6555535 (patch)
tree48a549cef59b0fa4ee63ce0750b141fa9bc23a99 /clang/unittests/Format/FormatTest.cpp
parentc4231cc9b3e44e2a2bf2d923955762b027ed03c6 (diff)
downloadbcm5719-llvm-1565eb3e381161924c96884c3bbc64bea6555535.tar.gz
bcm5719-llvm-1565eb3e381161924c96884c3bbc64bea6555535.zip
Don't try to do a hanging ident after assignments.
Before: bool aaaa = aaaaaaaaaaa( aaaaaaaaaaaaaaaaa); After: bool aaaa = aaaaaaaaaaa( aaaaaaaaaaaaaaaaa); The other indentation was a nice attempt but doesn't work in many cases. Not sure what the right long term solution is as the "After: " is still not nice. We either need to figure out what to do in the cases where it "doesn't work" or come up with a third solution, e.g. falling back to: bool aaaa = aaaaaaaaaaa( aaaaaaaaaaaaaaaaa); which should always work and nicely highlight the structure. llvm-svn: 173268
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 708b7d8086a..493f2ad7b2e 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1040,9 +1040,8 @@ TEST_F(FormatTest, BreaksAfterAssignments) {
" TTI.getMemoryOpCost(I->getOpcode(), VectorTy, SI->getAlignment(),\n"
" SI->getPointerAddressSpaceee());\n");
verifyFormat(
- "CharSourceRange LineRange =\n"
- " CharSourceRange::getTokenRange(Line.Tokens.front().Tok.getLoc(),\n"
- " Line.Tokens.back().Tok.getLoc());");
+ "CharSourceRange LineRange = CharSourceRange::getTokenRange(\n"
+ " Line.Tokens.front().Tok.getLo(), Line.Tokens.back().Tok.getLoc());");
}
TEST_F(FormatTest, AlignsAfterAssignments) {
OpenPOWER on IntegriCloud