================
@@ -491,6 +491,31 @@ void UnwrappedLineParser::calculateBraceTypes(bool
ExpectClassBody) {
SmallVector<StackEntry, 8> LBraceStack;
assert(Tok->is(tok::l_brace));
+ constexpr int MaxLookBack = 64;
+ const auto IsAddressOfParenExpression = [](const FormatToken *RightParen) {
+ if (!RightParen || RightParen->isNot(tok::r_paren))
----------------
Lane0218 wrote:
Thanks for the feedback! I made the precondition explicit at the call site
(only call the helper when PrevTok is present and tok::r_paren) and replaced
the redundant null/kind checks inside the helper with an assert to document the
contract.
https://github.com/llvm/llvm-project/pull/173771
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits