djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Format/FormatTokenLexer.cpp:344
+  size_t To = Lex->getBuffer().find_first_of('\n', From);
+  if (To == StringRef::npos) To = Lex->getBuffer().size();
+  size_t Len = To - From;
----------------
There should be a linebreak here.


================
Comment at: lib/Format/UnwrappedLineParser.cpp:59
 static bool isLineComment(const FormatToken &FormatTok) {
-  return FormatTok.is(tok::comment) && FormatTok.TokenText.startswith("//");
+  return FormatTok.is(tok::comment) && (FormatTok.TokenText.startswith("//") ||
+                                        FormatTok.TokenText.startswith("#"));
----------------
Maybe it's now better to do:

  return FormatTok.is(tok::comment) && !FormatTok.TokenText.startsWith("/*");

?


https://reviews.llvm.org/D39806



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to