[PATCH] D141811: [clang-format] Allow trailing return types in macros

Emilia Dreamer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 23:38:59 PST 2023


rymiel added a comment.

I suppose this means `auto a = (b) -> c;` is also technically broken, actually, and there's no easy fix for that.

I did have an idea for adding an additional pass taking place somewhere in `TokenAnnotator::calculateFormattingInformation`, which would detect trailing return types using a bit more context, as a potential fix for https://github.com/llvm/llvm-project/issues/41495. I suppose I could make that theoretically replace all of this AutoFound logic. I should actually try to see if my idea would work at all though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141811



More information about the cfe-commits mailing list