hanchenye-llvm-project/clang/lib/Format
Krasimir Georgiev 20bef459fc [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
2019-02-04 09:56:16 +00:00
..
AffectedRangeManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AffectedRangeManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakableToken.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BreakableToken.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
ContinuationIndenter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ContinuationIndenter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Encoding.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatToken.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTokenLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatTokenLexer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamespaceEndCommentsFixer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NamespaceEndCommentsFixer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortJavaScriptImports.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnalyzer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenAnnotator.cpp [clang-format] Fix breaking of qualified operator 2019-02-04 09:56:16 +00:00
TokenAnnotator.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnwrappedLineFormatter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnwrappedLineFormatter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnwrappedLineParser.cpp [clang-format] Fix line parsing for noexcept lambdas 2019-01-30 13:54:32 +00:00
UnwrappedLineParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UsingDeclarationsSorter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UsingDeclarationsSorter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WhitespaceManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WhitespaceManager.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00