================
@@ -90,6 +90,9 @@ static bool isCppAttribute(bool IsCpp, const FormatToken
&Tok) {
// The first square bracket is part of an ObjC array literal
if (Tok.Previous && Tok.Previous->is(tok::at))
return false;
+ // Avoid mis-annotating the inner '[[' of malformed input.
+ if (Tok.Previous && Tok.Previous->is(tok::l_square))
----------------
HazardyKnusperkeks wrote:
```suggestion
if (Tok.Previous && Tok.Previous->isOneOf(tok::at, tok::l_square))
return false;
```
You can merge the comments.
https://github.com/llvm/llvm-project/pull/199103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits