[PATCH] D118969: [clang-format][NFC] Fix a bug in setting type FunctionLBrace

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 4 00:22:44 PST 2022


owenpan added a comment.

In D118969#3295909 <https://reviews.llvm.org/D118969#3295909>, @curdeius wrote:

> Well, I thought about this approach but actually a macro line should never be merged together with a preceding line, so I went for a generic approach.

That's why I didn't say yours would be obsolete. :)

> That's because one never knows what's in a macro, it can well be a function brace after all depending on what goes before...

This is exactly why we should //not// set the type to `FunctionLBrace`.

> Apart from that, could you add an annotator test please?

Done.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118969/new/

https://reviews.llvm.org/D118969



More information about the cfe-commits mailing list