================
@@ -708,6 +708,11 @@ class AnnotatingParser {
IsCpp && !IsCpp11AttributeSpecifier && !IsCSharpAttributeSpecifier &&
Contexts.back().CanBeExpression && Left->isNot(TT_LambdaLSquare) &&
CurrentToken->isNoneOf(tok::l_brace, tok::r_square) &&
+ // Do not consider '[' after a comma inside a braced initializer the
+ // start of an ObjC method expression. In braced initializer lists,
+ // commas are list separators and should not trigger ObjC parsing.
+ !(Parent && Parent->is(tok::comma) &&
+ Contexts.back().ContextKind == tok::l_brace) &&
----------------
HazardyKnusperkeks wrote:
```suggestion
(!Parent || Parent->isNot(tok::comma) ||
Contexts.back().ContextKind != tok::l_brace) &&
```
Same style as below.
https://github.com/llvm/llvm-project/pull/169228
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits