This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] revert over-eager ASI check.
ClosedPublic

Authored by mprobst on Jan 16 2017, 1:57 AM.

Details

Summary

Change r291428 introduced ASI detection after closing curly braces. That would generally be correct, however this breaks indentation for structural statements. What happens is that CompoundStatementIndenter increases indentation for the current line, then after reading ASI creates a new line (with the increased line level), and only after the structural parser sees e.g. the if/then/else branch closed, line level is reduced. That leads to the new line started by ASI having a level too high.

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst updated this revision to Diff 84527.Jan 16 2017, 1:57 AM
mprobst retitled this revision from to clang-format: [JS] revert over-eager ASI check..
mprobst updated this object.
mprobst added a reviewer: djasper.
mprobst added subscribers: cfe-commits, sammccall.
sammccall accepted this revision.Jan 16 2017, 2:02 AM
sammccall added a reviewer: sammccall.
This revision is now accepted and ready to land.Jan 16 2017, 2:02 AM
This revision was automatically updated to reflect the committed changes.