forked from OSchip/llvm-project
0fad648b65
Summary:
After D50078, we're experiencing unexpected un-indent using a style combining `AlignOperands: DontAlign` with `BreakBeforeTernaryOperators: false`, such as Google's JavaScript style:
```
% bin/clang-format -style=google ~/test.js
aaaaaaaaaaa = bbbbbbbb ? cccccccccccccccccc() :
dddddddddd ? eeeeeeeeeeeeee :
fffff;
```
The issue lies with the interaction of `AlignOperands: DontAlign` and the edited code section in ContinuationIndenter.cpp, which de-dents the intent by `Style.ContinuationIndentWidth`. From [[
|
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CleanupTest.cpp | ||
FormatTest.cpp | ||
FormatTestCSharp.cpp | ||
FormatTestComments.cpp | ||
FormatTestJS.cpp | ||
FormatTestJava.cpp | ||
FormatTestObjC.cpp | ||
FormatTestProto.cpp | ||
FormatTestRawStrings.cpp | ||
FormatTestSelective.cpp | ||
FormatTestTableGen.cpp | ||
FormatTestTextProto.cpp | ||
FormatTestUtils.h | ||
NamespaceEndCommentsFixerTest.cpp | ||
SortImportsTestJS.cpp | ||
SortImportsTestJava.cpp | ||
SortIncludesTest.cpp | ||
UsingDeclarationsSorterTest.cpp |