[PATCH] Keep track of indentation levels in static initializers for correct indentation with tabs.
alexfh at google.com
Wed Oct 2 06:17:22 PDT 2013
> What is the reason for this change?
The main reason for this change is to have static initializer contents to be indented with tabs in cases where we use exactly one IndentWidth (see the test for an example, it used to indent with spaces before this change).
> I don't understand how the two variables can be different..
If you mean LineState::Level and ParenState::IndentLevel, the latter is different for different fragments of the line, while the former one is obviously the same for the whole line. Please see the NewIndentLevel variable usage in ContinuationIndenter::moveStateToNextToken for the exact way how this is done.
More information about the cfe-commits