Fixes #59089.
Differential Revision: https://reviews.llvm.org/D138371
return false;
} else if (isCppAttribute(IsCpp, *Next)) {
Next = Next->MatchingParen;
+ if (!Next)
+ return false;
} else if (Next->is(tok::l_paren)) {
break;
} else {
"}",
Style);
+ verifyIncompleteFormat("class C final [[deprecated(l]] {});", Style);
+
// These tests are here to show a problem that may not be easily
// solved, our implementation to remove semicolons is only as good
// as our FunctionLBrace detection and this fails for empty braces