diff options
| author | Alexander Kornienko <alexfh@google.com> | 2013-07-04 14:47:51 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2013-07-04 14:47:51 +0000 |
| commit | 0bdc6434fa0fea933b6ab566eff751afdba40a2a (patch) | |
| tree | 2faa137a1566a6bc4c7aff258efeaba9b8783587 /lib/Format/Format.cpp | |
| parent | 08e81f09bba9a4da8bb5bcdc1c1e29285eb85682 (diff) | |
| download | clang-0bdc6434fa0fea933b6ab566eff751afdba40a2a.tar.gz clang-0bdc6434fa0fea933b6ab566eff751afdba40a2a.tar.bz2 clang-0bdc6434fa0fea933b6ab566eff751afdba40a2a.tar.xz | |
Fixed typo: NoneComment -> NonComment, no other changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
| -rw-r--r-- | lib/Format/Format.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index a4b5f4197d..e5a8ad383b 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -587,7 +587,7 @@ private: for (unsigned i = 0, e = State.Stack.size() - 1; i != e; ++i) { State.Stack[i].BreakBeforeParameter = true; } - const FormatToken *TokenBefore = Current.getPreviousNoneComment(); + const FormatToken *TokenBefore = Current.getPreviousNonComment(); if (TokenBefore && !TokenBefore->isOneOf(tok::comma, tok::semi) && TokenBefore->Type != TT_TemplateCloser && TokenBefore->Type != TT_BinaryOperator && !TokenBefore->opensScope()) @@ -714,7 +714,7 @@ private: State.Stack.back().Indent += 4; // Insert scopes created by fake parenthesis. - const FormatToken *Previous = Current.getPreviousNoneComment(); + const FormatToken *Previous = Current.getPreviousNonComment(); // Don't add extra indentation for the first fake parenthesis after // 'return', assignements or opening <({[. The indentation for these cases // is special cased. @@ -753,7 +753,7 @@ private: bool AvoidBinPacking; if (Current.is(tok::l_brace)) { NewIndent = Style.IndentWidth + LastSpace; - const FormatToken *NextNoComment = Current.getNextNoneComment(); + const FormatToken *NextNoComment = Current.getNextNonComment(); AvoidBinPacking = NextNoComment && NextNoComment->Type == TT_DesignatedInitializerPeriod; } else { @@ -1275,13 +1275,13 @@ public: // Adapt level to the next line if this is a comment. // FIXME: Can/should this be done in the UnwrappedLineParser? - const AnnotatedLine *NextNoneCommentLine = NULL; + const AnnotatedLine *NextNonCommentLine = NULL; for (unsigned i = AnnotatedLines.size() - 1; i > 0; --i) { - if (NextNoneCommentLine && AnnotatedLines[i].First->is(tok::comment) && + if (NextNonCommentLine && AnnotatedLines[i].First->is(tok::comment) && !AnnotatedLines[i].First->Next) - AnnotatedLines[i].Level = NextNoneCommentLine->Level; + AnnotatedLines[i].Level = NextNonCommentLine->Level; else - NextNoneCommentLine = + NextNonCommentLine = AnnotatedLines[i].First->isNot(tok::r_brace) ? &AnnotatedLines[i] : NULL; } @@ -1531,8 +1531,8 @@ private: FormatToken *Tok = (I + 1)->First; if (Tok->is(tok::r_brace) && !Tok->MustBreakBefore && - (Tok->getNextNoneComment() == NULL || - Tok->getNextNoneComment()->is(tok::semi))) { + (Tok->getNextNonComment() == NULL || + Tok->getNextNonComment()->is(tok::semi))) { // We merge empty blocks even if the line exceeds the column limit. Tok->SpacesRequiredBefore = 0; Tok->CanBreakBefore = true; @@ -1556,7 +1556,7 @@ private: // Last, check that the third line contains a single closing brace. Tok = (I + 2)->First; - if (Tok->getNextNoneComment() != NULL || Tok->isNot(tok::r_brace) || + if (Tok->getNextNonComment() != NULL || Tok->isNot(tok::r_brace) || Tok->MustBreakBefore) return; |
