forked from OSchip/llvm-project
20bef459fc
Summary: From https://bugs.llvm.org/show_bug.cgi?id=40516 ``` $ cat a.cpp const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::myFunction() { // do stuff } const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::operator++() { // do stuff } $ ~/ll/build/opt/bin/clang-format -style=LLVM a.cpp const NamespaceName::VeryLongClassName & NamespaceName::VeryLongClassName::myFunction() { // do stuff } const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName:: operator++() { // do stuff } ``` What was happening is that the split penalty before `operator` was being set to a smaller value by a prior if block. Moved checks around to fix this and added a regression test. Reviewers: djasper Reviewed By: djasper Tags: #clang Differential Revision: https://reviews.llvm.org/D57604 llvm-svn: 353033 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CleanupTest.cpp | ||
FormatTest.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 |