[PATCH] D37973: [clang-format] Fix regression about short functions after #else

2017-10-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
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

[PATCH] D37973: [clang-format] Fix regression about short functions after #else

2017-10-02 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D37973: [clang-format] Fix regression about short functions after #else

2017-09-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
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