This is an archive of the discontinued LLVM Phabricator instance.

Fix alignment of trailing block comments.
ClosedPublic

Authored by alexfh on Apr 17 2014, 6:40 AM.

Details

Summary

This patch ensures that the lines of the block comments retain relative
column offsets. In order to do this WhitespaceManager::Changes representing
continuation of block comments keep a pointer on the change representing the
whitespace change before the block comment, and a relative column offset to this
change, so that the correct column can be reconstructed at the end of alignment
process.

Fixes http://llvm.org/PR19325

Diff Detail

Event Timeline

djasper accepted this revision.Apr 17 2014, 8:40 AM

Two nits, otherwise looks good (assuming the tests pass ;-) ).

lib/Format/WhitespaceManager.cpp
136

I think this might actually be shorter with if .. else ..

lib/Format/WhitespaceManager.h
147

Please add a comment.

alexfh closed this revision.Apr 17 2014, 9:19 AM