================
Comment at: lib/Format/Format.cpp:581
@@ +580,3 @@
+        FormatTok->TokenText.find('\n') != StringRef::npos)
+      FormatTok->IsMultiline = true;
+
----------------
Why not store the position itself? Should take as much space as the boolean 
(not that I am at all worried about space) and then you don't have to re-search.

Actually, how about storing both, the position of the first and the last "\n". 
I think during the actual formatting, it is possible that we place the same 
string literal in hundreds or thousands of different combinations. We should 
then avoid doing this calculation over and over again.


http://llvm-reviews.chandlerc.com/D1544

COMMIT
  http://llvm-reviews.chandlerc.com/rL189595
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to