From 720ffb644400661b927c6359aac5677dab036ed4 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 5 Dec 2012 13:56:52 +0000 Subject: Follow-up to r169286, addresses comments in http://llvm-reviews.chandlerc.com/D164#comment-4 : comments and a method rename git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169382 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/Format.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/Format/Format.cpp') diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 22805f691e..78450469f5 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -315,7 +315,8 @@ private: } /// \brief Add a new line and the required indent before the first Token - /// of the \c UnwrappedLine. + /// of the \c UnwrappedLine if there was no structural parsing error. + /// Returns the indent level of the \c UnwrappedLine. unsigned formatFirstToken() { const FormatToken &Token = Line.Tokens[0]; if (!Token.WhiteSpaceStart.isValid() || StructuralError) @@ -706,16 +707,16 @@ public: for (std::vector::iterator I = UnwrappedLines.begin(), E = UnwrappedLines.end(); I != E; ++I) - doFormatUnwrappedLine(*I); + formatUnwrappedLine(*I); return Replaces; } private: - virtual void formatUnwrappedLine(const UnwrappedLine &TheLine) { + virtual void consumeUnwrappedLine(const UnwrappedLine &TheLine) { UnwrappedLines.push_back(TheLine); } - void doFormatUnwrappedLine(const UnwrappedLine &TheLine) { + void formatUnwrappedLine(const UnwrappedLine &TheLine) { if (TheLine.Tokens.size() == 0) return; -- cgit v1.2.3-18-g5258