aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2019-02-04 09:56:16 +0000
committerKrasimir Georgiev <krasimir@google.com>2019-02-04 09:56:16 +0000
commit20bef459fca6069d5c01d38c5eebf2582930c96f (patch)
tree01cacc65b035973f2a46c33c6cd2308102c12472 /llvm/lib/Support/CommandLine.cpp
parent65970aa24dd32328d00cf6560c21f2c5ff876c2d (diff)
downloadllvm-20bef459fca6069d5c01d38c5eebf2582930c96f.zip
llvm-20bef459fca6069d5c01d38c5eebf2582930c96f.tar.gz
llvm-20bef459fca6069d5c01d38c5eebf2582930c96f.tar.bz2
[clang-format] Fix breaking of qualified operator
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
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions