This is an archive of the discontinued LLVM Phabricator instance.

clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor.
ClosedPublic

Authored by djasper on Oct 31 2015, 5:23 PM.

Details

Summary

With this change, clang-format stops formatting when either it leaves
the current scope or when it comes back to the initial scope after
going into a nested one.

Diff Detail

Repository
rL LLVM

Event Timeline

djasper updated this revision to Diff 38838.Oct 31 2015, 5:23 PM
djasper retitled this revision from to clang-format: Be slightly more cautious when formatting subsequent lines after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor..
djasper updated this object.
djasper added a reviewer: klimek.
djasper added a subscriber: cfe-commits.
klimek accepted this revision.Oct 31 2015, 5:29 PM
klimek edited edge metadata.

lg

This revision is now accepted and ready to land.Oct 31 2015, 5:29 PM
This revision was automatically updated to reflect the committed changes.