================
@@ -1593,6 +1593,12 @@ void UnwrappedLineParser::parseStructuralElement(
       // field/method declaration.
       break;
     }
+    // In C, `try` is not a keyword; treat it as an identifier.
+    if (Style.isCpp() && FormatTok->is(tok::kw_try) &&
+        !Tokens->peekNextToken(/*SkipComment=*/true)
+             ->isOneOf(tok::l_brace, tok::colon, tok::hash)) {
----------------
HazardyKnusperkeks wrote:

```suggestion
        Tokens->peekNextToken(/*SkipComment=*/true)
             ->isNoneOf(tok::l_brace, tok::colon, tok::hash)) {
```

https://github.com/llvm/llvm-project/pull/184891
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to