]> granicus.if.org Git - clang/commitdiff
[clang-format] Fix clang-tidy readability problems, NFCI
authorKrasimir Georgiev <krasimir@google.com>
Mon, 23 Apr 2018 10:02:59 +0000 (10:02 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Mon, 23 Apr 2018 10:02:59 +0000 (10:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330574 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/BreakableToken.h
lib/Format/NamespaceEndCommentsFixer.cpp
lib/Format/TokenAnnotator.h

index eba48f75e88fde9e65abbde3c878409a0791f624..1af031145cc146d815a093d701f67801f5ea8aa9 100644 (file)
@@ -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;
index 6311c058aed2cd5fff1832bda181360a0ec0a84b..ea369a769fb0fb4c9a7ba7abf1ec5851ebf08f48 100644 (file)
@@ -110,11 +110,11 @@ void updateEndComment(const FormatToken *RBraceTok, StringRef EndCommentText,
 } // namespace
 
 const FormatToken *
-getNamespaceToken(const AnnotatedLine *line,
+getNamespaceToken(const AnnotatedLine *Line,
                   const SmallVectorImpl<AnnotatedLine *> &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());
index 7be0753c20aee4cbc8fd7c1f58a1fa34b71af188..15b9ae64629d84c3e3b24f289b45ccf0c1e7aa14 100644 (file)
@@ -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);