aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-05-11 08:21:35 +0000
committerManuel Klimek <klimek@google.com>2015-05-11 08:21:35 +0000
commitd3585dbd1abef83b4aa922c814a637fc38d4e1b2 (patch)
tree3476da513f7d68795fa134083e15f90507fae248 /clang/lib/Format/Format.cpp
parentf0d68d788b7ff79ffdd315db3b57b6c4e0f0de2b (diff)
downloadllvm-d3585dbd1abef83b4aa922c814a637fc38d4e1b2.zip
llvm-d3585dbd1abef83b4aa922c814a637fc38d4e1b2.tar.gz
llvm-d3585dbd1abef83b4aa922c814a637fc38d4e1b2.tar.bz2
Refactor the formatter of clang-format.
Pull various parts of the UnwrappedLineFormatter into their own abstractions. NFC. There are two things left for subsequent changes (to keep this reasonably small) - the UnwrappedLineFormatter now has a bad name - the UnwrappedLineFormatter::format function is still too large llvm-svn: 236974
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index aec5bb4..9814647 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1269,9 +1269,9 @@ public:
ContinuationIndenter Indenter(Style, Tokens.getKeywords(), SourceMgr,
Whitespaces, Encoding,
BinPackInconclusiveFunctions);
- UnwrappedLineFormatter Formatter(&Indenter, &Whitespaces, Style,
- Tokens.getKeywords(), IncompleteFormat);
- Formatter.format(AnnotatedLines, /*DryRun=*/false);
+ UnwrappedLineFormatter(&Indenter, &Whitespaces, Style, Tokens.getKeywords(),
+ IncompleteFormat)
+ .format(AnnotatedLines);
return Whitespaces.generateReplacements();
}