[libcxx-commits] [PATCH] D59767: [pstl] Indent preprocessor directives as part of the clang-format rules
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 26 06:20:50 PDT 2019
ldionne added a comment.
In D59767#1442829 <https://reviews.llvm.org/D59767#1442829>, @MikeDvorskiy wrote:
> > a significant gain in readability
> To tell the truth, I guess it is subjectively... and rather it is a question of habit IMHO...
Why do we indent normal `if` statements? This isn't true for all libraries, but a base library like the standard library tends to have so much preprocessor-level logic that things become really hard to grasp when things are not indented properly. Again, to be clear, it's not about the cuteness of indenting inside a single `#if`, it's about how to spot matching `#endif`s when deeply nested.
> Or this style is accepted for libcxx and libcstd and we have to do it for making code consistent ? If yes, I have no objections.
libc++ doesn't do this consistently and this has been a source of confusion in the past, in `__config` where there are many nested `#if`s.
CHANGES SINCE LAST ACTION
More information about the libcxx-commits