diff options
| author | Daniel Jasper <djasper@google.com> | 2015-11-20 16:44:28 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2015-11-20 16:44:28 +0000 |
| commit | 71e574543f8642bc05872760e577e8aee8d096b7 (patch) | |
| tree | 2b9298d5cb38ae9ca630078fa5cd2329cc43248f /clang/lib | |
| parent | 43db5b7daa846d94261f5d574a2f337b6f30deb0 (diff) | |
| download | bcm5719-llvm-71e574543f8642bc05872760e577e8aee8d096b7.tar.gz bcm5719-llvm-71e574543f8642bc05872760e577e8aee8d096b7.zip | |
clang-format: [JS] Make AllowShortFunctionsOnASingle line value "Empty"
work properly.
llvm-svn: 253674
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 171ecc41d78..5aa4dadb551 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -2104,6 +2104,7 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, !Left.Children.empty()) // Support AllowShortFunctionsOnASingleLine for JavaScript. return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None || + Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty || (Left.NestingLevel == 0 && Line.Level == 0 && Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline); |

