[clang-format] Don't allow variable decls to have trailing return arrows
The heuristic for determining if an arrow is a trailing return arrow looks for the auto keyword, along with parentheses. This isn't sufficient, since it also triggers on variable declarations with an auto type, and with an arrow operator. This patch makes sure a function declaration is being parsed, instead of any other declaration. Fixes https://github.com/llvm/llvm-project/issues/61469 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D147377
Loading
Please sign in to comment