djasper added inline comments.

================
Comment at: lib/Format/Format.cpp:1131
@@ +1130,3 @@
+    // and adjust ColumnWidth to take the added escapes into account.
+    FormatTok->ColumnWidth = ColumnWidth;
+
----------------
Maybe add a FIXME saying that we also need to modify the TokenText if we want 
to be able to correctly split a long string literal.

================
Comment at: lib/Format/Format.cpp:1134
@@ +1133,3 @@
+    SourceRange Range(FormatTok->Tok.getLocation(), 
FormatTok->Tok.getEndLoc());
+    Replaces.insert(tooling::Replacement(
+        SourceMgr, CharSourceRange::getCharRange(Range), Out.str()));
----------------
Thinking about this some more, I think it would be better to have replacements 
just changing each of the replaced quotes. Otherwise, this can get really 
tricky once we want to start to automatically split up long string literals. 
Should not make a difference performance-wise.


http://reviews.llvm.org/D17385



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

Reply via email to