bassiounix wrote:

> Is there a bug report for this? If not can you create one?

Yes, #237951 tracks it: `void foo() { __super; }` in C with 
`-fms-compatibility`/`-fms-extensions` hits the `kw___super` assertion in 
`ParseCastExpression`, going back to clang 3.6. That is what clang 22 does on 
`if (__super)`.

Correction to my description, though: on trunk `if (__super)` doesn't get that 
far. It overflows in the `kw___super` case of `isCXXDeclarationSpecifier`, the 
same recursion as `::`, because `__super` can't be annotated in C either. I've 
still left it out: returning `False` there for C would only turn the stack 
overflow into the #237951 assertion. The real fix is in #237951 (probably not 
lexing `__super` as a keyword in C, since it's `KEYMS`), and that removes both 
paths. I've added the trunk reproducer to that issue and updated the PR 
description.

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

Reply via email to