This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Alternate merge of D21279
AbandonedPublic

Authored by daphnediane on Feb 6 2017, 9:52 AM.

Details

Reviewers
None
Summary

Alternate version of D21279 merged on changes from rL293616.

Diff Detail

Event Timeline

daphnediane created this revision.Feb 6 2017, 9:52 AM
daphnediane retitled this revision from Alternate merge to [clang-format] Alternate merge of D21279.Feb 6 2017, 9:56 AM
daphnediane edited the summary of this revision. (Show Details)
daphnediane set the repository for this revision to rL LLVM.
daphnediane added a project: Restricted Project.
daphnediane added inline comments.Feb 6 2017, 10:18 AM
lib/Format/WhitespaceManager.cpp
88

Original version of the patch called propagateIndentLevels after the above line.

203

The original version of the patch had a TokenTypeAndLevel structure but the information needed was available just from the index, so that's all this version saves.

212

I tried just using NestingLevel here and below instead of the combined NestingLevel and IndentLevel and it doesn't work.

240

The original version of this code saved the TokenType in the stack and if made the decision on which token type to save based on if 2 back was a FunctionDeclarationName. This version moves that check to here where the token type is actually used.

418

Original version of patch used IsStartOfDeclName, equivalent logic is now done here.

lib/Format/WhitespaceManager.h
165

Is this still true? Moved this here from the propagateIndentLevels code in the original patch.

178

Original version of patch had a propagateIndentLevels here that is no longer need.

daphnediane abandoned this revision.Feb 24 2017, 4:27 PM

Changes have been combined into D21279