[PATCH] D29716: [clang-format] Move OriginalPrefix from base to subclass.

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 06:56:55 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL294457: [clang-format] Move OriginalPrefix from base to subclass. (authored by krasimir).

Changed prior to commit:
  https://reviews.llvm.org/D29716?vs=87643&id=87653#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29716

Files:
  cfe/trunk/lib/Format/BreakableToken.h


Index: cfe/trunk/lib/Format/BreakableToken.h
===================================================================
--- cfe/trunk/lib/Format/BreakableToken.h
+++ cfe/trunk/lib/Format/BreakableToken.h
@@ -282,10 +282,6 @@
   // line.
   bool FirstInLine;
 
-  // In case of line comments, holds the original prefix, including trailing
-  // whitespace.
-  SmallVector<StringRef, 16> OriginalPrefix;
-
   // The prefix to use in front a line that has been reflown up.
   // For example, when reflowing the second line after the first here:
   // // comment 1
@@ -394,6 +390,14 @@
   unsigned getContentStartColumn(unsigned LineIndex,
                                  unsigned TailOffset) const override;
 
+  // OriginalPrefix[i] contains the original prefix of line i, including
+  // trailing whitespace before the start of the content. The indentation
+  // preceding the prefix is not included.
+  // For example, if the line is:
+  // // content
+  // then the original prefix is "// ".
+  SmallVector<StringRef, 16> OriginalPrefix;
+
   // Prefix[i] contains the intended leading "//" with trailing spaces to
   // account for the indentation of content within the comment at line i after
   // formatting. It can be different than the original prefix when the original


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29716.87653.patch
Type: text/x-patch
Size: 1272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170208/3214a854/attachment.bin>


More information about the cfe-commits mailing list