[clang-format] Allow default values for template parameters in lambda (#69052)
Previously, upon encountering an equals sign while parsing a lambda in the UnwrappedLineParser, it would fall through and fail. This caused any lambda template with a default argument for a template parameter to be annotated as an ArraySubscriptLSquare. This patch allows equals signs in the UnwrappedLineParser if we're currently in a template parameter list. This resolved a FIXME that was in the lambda parsing function. This patch seems deceptively easy, it's likely it doesn't solve the FIXME entirely, or causes other issues (the FIXME itself mentions something about Objective-C, which I cannot comment about). However this patch is sufficient to fix the below issue. Fixes https://github.com/llvm/llvm-project/issues/68913 --------- Co-authored-by:Owen Pan <owenpiano@gmail.com>
parent
301a0dba
Please register or sign in to comment