This revision was automatically updated to reflect the committed changes.
Closed by commit rL314683: [clang-format] Fix regression about short functions
after #else (authored by krasimir).
Repository:
rL LLVM
https://reviews.llvm.org/D37973
Files:
cfe/trunk/lib/Format/UnwrappedLineFormatter
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
This test looks like it was intended to catch some case, maybe we're now
mishandling some case like
if (foo)
{
}
else
{
// this can now be merged
}
But there's no testca
krasimir created this revision.
Herald added a subscriber: klimek.
This patch fixes a regression introduced in r312904, where the formatter
confuses
the `else` in `#else` with an `else` of an `if-else` statement.
For example, formatting this code with google style
#ifdef A
int f() {}
#else