================
@@ -539,6 +547,12 @@ bool FormatTokenLexer::tryTransformTryUsageForC() {
auto &Try = *(Tokens.end() - 2);
if (Try->isNot(tok::kw_try))
return false;
+ // Don't reset TryMacros back to identifier — they legitimately use kw_try
+ // even when followed by '(' (for macro arguments like JSG_TRY(js)). If a
+ // configured TryMacro name is also used as a plain identifier somewhere,
that
+ // is a user configuration error, consistent with IfMacros/ForEachMacros.
+ if (Try->is(TT_TryMacro))
+ return false;
----------------
harrishancock wrote:
Removed in
https://github.com/llvm/llvm-project/pull/183352/changes/c7402cd181ff7d6ee93805d38e1aaa9d0a0f4a92
https://github.com/llvm/llvm-project/pull/183352
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits