Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-02 Thread Daniel Jasper via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r262534. http://reviews.llvm.org/D17385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-02 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Comment at: lib/Format/Format.cpp:1140 @@ +1139,3 @@ + + void insertReplacement(SourceLocation Start, unsigned Length, + StringRef Repla

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Martin Probst via cfe-commits
mprobst marked 2 inline comments as done. Comment at: unittests/Format/FormatTestJS.cpp:639-640 @@ -638,3 +638,4 @@ verifyFormat("var literal = 'hello ' +\n" - "'world';"); + "'worldworldworldworld';", + getGoogleJSStyleWithColu

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 49579. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. - remove sstream import - * Treat JavaScript single quoted string literals as tok::string_literal, not - Address review comments, mostly renaming thin

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Daniel Jasper via cfe-commits
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 TokenTe

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 49569. mprobst marked an inline comment as done. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. - remove sstream import - * Treat JavaScript single quoted string literals as tok::string_literal, not - Add

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Martin Probst via cfe-commits
mprobst updated this revision to Diff 49562. mprobst marked 6 inline comments as done. mprobst added a comment. - Move code closer together by piping Replacements into the FormatTokenLexer. - remove sstream import - * Treat JavaScript single quoted string literals as tok::string_literal, not - Add

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Martin Probst via cfe-commits
mprobst added inline comments. Comment at: lib/Format/Format.cpp:1087 @@ +1086,3 @@ +(Style.Quotes == FormatStyle::QS_Single && + !FormatTok->TokenText.startswith("\"")) || +(Style.Quotes == FormatStyle::QS_Double && djasper wrote: > Are th

Re: [PATCH] D17385: clang-format: [JS] re-quote single or double quoted strings.

2016-03-01 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:606 @@ +605,3 @@ + /// \brief The QuoteStyle to use for JavaScript strings. + QuoteStyle Quotes; + As this only affects JavaScript and doesn't make any sense for Java or C++, I'd like to h