[clang-format] Improve detection of parameter declarations in K&R C
authorowenca <owenpiano@gmail.com>
Sun, 15 Aug 2021 21:03:17 +0000 (14:03 -0700)
committerowenca <owenpiano@gmail.com>
Wed, 18 Aug 2021 22:21:48 +0000 (15:21 -0700)
commit643f2be7b6afd91d9f0d6df89cd3391835763112
treed4a430c67cf413246f6a851c8785e885501822bf
parent698e2106362add2bd3aca6f8ffebe9dd90a50529
[clang-format] Improve detection of parameter declarations in K&R C

Clean up the detection of parameter declarations in K&R C function
definitions. Also make it more precise by requiring the second
token after the r_paren to be either a star or keyword/identifier.

Differential Revision: https://reviews.llvm.org/D108094
clang/lib/Format/UnwrappedLineParser.cpp