diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-21 15:00:29 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-21 15:00:29 +0000 |
commit | 7d81281fc39f6d40d86be6600adba13c05b4a639 (patch) | |
tree | 59b902e3f6861ec73f781d3547f75bc92a8fddcf /lib/Lex/Lexer.cpp | |
parent | 3aada3c305a0f0ecfad2e4d0cf977ee9d2b2c71f (diff) |
Allow breaking between type and name in for loops.
This fixes llvm.org/PR15033.
Also: Always break before a parameter, if the previous parameter was
split over multiple lines. This was necessary to make the right
decisions in for-loops, almost always makes the code more readable and
also fixes llvm.org/PR14873.
Before:
for (llvm::ArrayRef<NamedDecl *>::iterator I = FD->getDeclsInPrototypeScope()
.begin(), E = FD->getDeclsInPrototypeScope().end();
I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
ccccccccccccccccccccccccccccc), d, bar(e, f));
After:
for (llvm::ArrayRef<NamedDecl *>::iterator
I = FD->getDeclsInPrototypeScope().begin(),
E = FD->getDeclsInPrototypeScope().end();
I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
ccccccccccccccccccccccccccccc),
d, bar(e, f));
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
0 files changed, 0 insertions, 0 deletions