From 6bbc7069c13d78b6ae6f185891a89a847b17b430 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 23 Apr 2018 10:02:59 +0000 Subject: [PATCH] [clang-format] Fix clang-tidy readability problems, NFCI llvm-svn: 330574 --- clang/lib/Format/BreakableToken.h | 4 ++-- clang/lib/Format/NamespaceEndCommentsFixer.cpp | 6 +++--- clang/lib/Format/TokenAnnotator.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/lib/Format/BreakableToken.h b/clang/lib/Format/BreakableToken.h index eba48f7..1af0311 100644 --- a/clang/lib/Format/BreakableToken.h +++ b/clang/lib/Format/BreakableToken.h @@ -242,7 +242,7 @@ public: encoding::Encoding Encoding, const FormatStyle &Style); Split getSplit(unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, - unsigned ReflowColumn, + unsigned ContentStartColumn, llvm::Regex &CommentPragmasRegex) const override; void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override; @@ -284,7 +284,7 @@ public: bool supportsReflow() const override { return true; } unsigned getLineCount() const override; Split getSplit(unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, - unsigned ReflowColumn, + unsigned ContentStartColumn, llvm::Regex &CommentPragmasRegex) const override; void compressWhitespace(unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) const override; diff --git a/clang/lib/Format/NamespaceEndCommentsFixer.cpp b/clang/lib/Format/NamespaceEndCommentsFixer.cpp index 6311c05..ea369a7 100644 --- a/clang/lib/Format/NamespaceEndCommentsFixer.cpp +++ b/clang/lib/Format/NamespaceEndCommentsFixer.cpp @@ -110,11 +110,11 @@ void updateEndComment(const FormatToken *RBraceTok, StringRef EndCommentText, } // namespace const FormatToken * -getNamespaceToken(const AnnotatedLine *line, +getNamespaceToken(const AnnotatedLine *Line, const SmallVectorImpl &AnnotatedLines) { - if (!line->Affected || line->InPPDirective || !line->startsWith(tok::r_brace)) + if (!Line->Affected || Line->InPPDirective || !Line->startsWith(tok::r_brace)) return nullptr; - size_t StartLineIndex = line->MatchingOpeningBlockLineIndex; + size_t StartLineIndex = Line->MatchingOpeningBlockLineIndex; if (StartLineIndex == UnwrappedLine::kInvalidIndex) return nullptr; assert(StartLineIndex < AnnotatedLines.size()); diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h index 7be0753c..15b9ae6 100644 --- a/clang/lib/Format/TokenAnnotator.h +++ b/clang/lib/Format/TokenAnnotator.h @@ -161,7 +161,7 @@ private: bool spaceRequiredBetween(const AnnotatedLine &Line, const FormatToken &Left, const FormatToken &Right); - bool spaceRequiredBefore(const AnnotatedLine &Line, const FormatToken &Tok); + bool spaceRequiredBefore(const AnnotatedLine &Line, const FormatToken &Right); bool mustBreakBefore(const AnnotatedLine &Line, const FormatToken &Right); -- 2.7.4