| Issue |
240146
|
| Summary |
[clang] `if (this int(1); 0)`: tentative parse of a condition asserts "Expected '('" in `isCXXConditionDeclarationOrInitStatement`
|
| Labels |
clang:frontend,
crash,
generated by fuzzer
|
| Assignees |
|
| Reporter |
YuanchengJiang
|
The following code:
```cpp
void f() {
if (this int(1); 0) {}
}
```
Resulted in this output:
```
clang++: /root/llvm-project/llvm/tools/clang/lib/Parse/ParseTentative.cpp:483: clang::Parser::ConditionOrInitStatement clang::Parser::isCXXConditionDeclarationOrInitStatement(bool, bool): Assertion `Tok.is(tok::l_paren) && "Expected '('"' failed.
```
Trunk reproducer (`-fsyntax-only`): https://godbolt.org/z/s5PPfWq1f
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs