When looking at switching LLVM's code to build in C++11 mode, most of the coding standard applies just fine. Most of the new features we know how to use, or we will learn through code review. But a few of the more mechanical bits would be easy to diverge wildly and result in inconsistency and confusion. In some cases, there are features that are fairly important to be used in a particular way to keep the code maintainable.
I talked to Richard Smith, Doug Gregor, and John McCall (as some of the more language oriented folks in the community), and with their help I came up with these additions to the coding standards. I'd like to get some broader input on these, but ideally I'd like to paint these bikesheds pretty quickly, put something in place, and revisit them if these guidelines don't really work out in practice.
Sort of random, but it seems like clang-format doesn't get this quite right. Maybe we should add something to the coding standard describing how to work around/with clang-format to get desirable results?
E.g.
First attempt, no coercion:
Adding one comment:
And then, for the "hanging" last lambda:
(The lack of space before that line comment is PR19017).