[PATCH] D35955: clang-format: Add preprocessor directive indentation

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 09:04:14 PDT 2017


klimek added a comment.

In https://reviews.llvm.org/D35955#834914, @djasper wrote:

> Manuel: Can you take a look at the last comment here? Why does PPBranchLevel start at -1?


It's a perhaps too-clever implementation to make sure that we can have a per-branch data structure (indexed from 0) , and then making sure that we never index out of bounds by never going down to -1 again.
I think if we need this info, we can just make it count down to -1 again (or, but that's isomorphic, let it run from 0 and make sure we never index into the data structures at 0 :)


https://reviews.llvm.org/D35955





More information about the cfe-commits mailing list