[PATCH] Insert a space at the start of a line comment in case it starts with an alphanumeric character.
Manuel Klimek
klimek at google.com
Tue Jun 11 08:43:41 PDT 2013
lg apart from nits
================
Comment at: lib/Format/BreakableToken.h:120
@@ +119,3 @@
+ // The prefix without an additional space if one was added.
+ StringRef OriginalPrefix;
+
----------------
Can we put that after the public section? I think implementation details should be hidden in the end, not exposed at the top.
================
Comment at: lib/Format/BreakableToken.h:132
@@ -128,1 +131,3 @@
unsigned ColumnLimit) const;
+ virtual void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split,
+ bool InPPDirective, WhitespaceManager &Whitespaces);
----------------
Hm, not sure, but I think we might want to also lower the implementation currently in BreakableSingleLineToken into BreakableStringLiteral.
================
Comment at: lib/Format/WhitespaceManager.h:57
@@ -56,4 +56,3 @@
///
- /// Will break at \p Offset inside \p Tok, putting \p PreviousPostfix before
- /// the line break and \p CurrentPrefix before the rest of the token starts in
- /// the next line.
+ /// Inserts \p PreviousPostfix, \p NewLines, \p Spaces and \p CurrentPrefix
+ /// (in this order) at \p Offset inside \p Tok, replacing \p ReplaceChars
----------------
Newline is one word. Here and elsewhere...
http://llvm-reviews.chandlerc.com/D949
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list