summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineFormatter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-11 13:31:45 +0000
committerDaniel Jasper <djasper@google.com>2015-06-11 13:31:45 +0000
commit20580fd5d378e952dff9d1f0331b27aee43b2ccd (patch)
tree548baecd8f3384ad1304575882d7fc9b53a347d2 /clang/lib/Format/UnwrappedLineFormatter.cpp
parent56691b8cb93c2d05c2679a8bf412a9913b3198dd (diff)
downloadbcm5719-llvm-20580fd5d378e952dff9d1f0331b27aee43b2ccd.tar.gz
bcm5719-llvm-20580fd5d378e952dff9d1f0331b27aee43b2ccd.zip
clang-format: Make SFS_Inline imply SFS_Empty.
In the long run, these two might be independent or we might to only allow specific combinations. Until we have a corresponding request, however, it is hard to do the right thing and choose the right configuration options. Thus, just don't touch the options yet and just modify the behavior slightly. llvm-svn: 239531
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineFormatter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp
index ee81b509d34..191b78d061a 100644
--- a/clang/lib/Format/UnwrappedLineFormatter.cpp
+++ b/clang/lib/Format/UnwrappedLineFormatter.cpp
@@ -189,7 +189,7 @@ private:
// If necessary, change to something smarter.
bool MergeShortFunctions =
Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All ||
- (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty &&
+ (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty &&
I[1]->First->is(tok::r_brace)) ||
(Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline &&
TheLine->Level != 0);
OpenPOWER on IntegriCloud