This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] handle comments in template strings.
ClosedPublic

Authored by mprobst on Apr 11 2015, 4:21 PM.

Details

Reviewers
djasper

Diff Detail

Event Timeline

mprobst updated this revision to Diff 23649.Apr 11 2015, 4:21 PM
mprobst retitled this revision from to clang-format: [JS] handle comments in template strings..
mprobst updated this object.
mprobst edited the test plan for this revision. (Show Details)
mprobst added a reviewer: djasper.
mprobst added subscribers: Unknown Object (MLST), Unknown Object (MLST).
djasper added inline comments.Apr 13 2015, 8:14 AM
unittests/Format/FormatTestJS.cpp
653

I'd be slightly hesitant to use verifyFormat for any of these as that simply cops out when finding "//". Thus, tests might pass for the wrong reasons. It is probably better to use EXPECT_EQ with a manually messed up "before".

mprobst updated this revision to Diff 23749.Apr 14 2015, 5:00 PM

Using EXPECT_EQ and manually messed up strings.

mprobst added inline comments.Apr 14 2015, 5:02 PM
unittests/Format/FormatTestJS.cpp
653

Done, wasn't aware of that. clang-format would actually misformat these snippets (indenting the second var) before the change, so the tests did move from red to green during development.

djasper accepted this revision.Apr 16 2015, 1:24 AM
djasper edited edge metadata.

Submitted as r235078.

This revision is now accepted and ready to land.Apr 16 2015, 1:24 AM
djasper closed this revision.Apr 16 2015, 1:24 AM