clang-format: Correctly calculate line lenghts for nest blocks.
If simple (one-statement) blocks can be inlined, the length needs to be calculated correctly. Before (in JavaScript but this also affects lambdas, etc.): var x = { valueOf: function() { return 1; } }; After: var x = {valueOf: function() { return 1; }}; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209410 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/Format/Format.cpp 3 additions, 1 deletionlib/Format/Format.cpp
- lib/Format/TokenAnnotator.cpp 14 additions, 8 deletionslib/Format/TokenAnnotator.cpp
- unittests/Format/FormatTest.cpp 6 additions, 16 deletionsunittests/Format/FormatTest.cpp
- unittests/Format/FormatTestJS.cpp 7 additions, 0 deletionsunittests/Format/FormatTestJS.cpp
Loading
Please register or sign in to comment