================
@@ -1297,6 +1297,11 @@ class AnnotatingParser {
         next();
         return true;
       }
+      // Avoid consuming an unbalanced `}` here: it would pop a Scopes frame
+      // owned by an enclosing parseBrace and trip its `!Scopes.empty()`
+      // assertion. See Issue #199017.
+      if (CurrentToken->is(tok::r_brace))
----------------
HazardyKnusperkeks wrote:

I don't think this is the right fix.
There's one place which break an assertion, are you sure there can't be another 
one to break the assertion? I think one should handle the bug there, were the 
assert fired.

And referring here to an assert elsewhere is bound to be broken, if the code 
with the assert gets refactored, this comment is possibly wrong.

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

Reply via email to