kr-2003 wrote:

> My theory with limited testing: The crash is caused by assertion failure at 
> https://github.com/llvm/llvm-project/blob/eb7c947272952d40d3235d89652a10da52cb2b4d/clang/lib/AST/DeclBase.cpp#L1757C1-L1758C54.
>  So if we disable assertions it does not crash, and crashes otherwise. Maybe 
> you can confirm this. There is a flaw in the logic of recovering from 
> syntax/semantic errors.

Even without removing those assertions, the malformed try-catch block gave 
parsing error successfully if we build it with the following flags.
```-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_PROJECTS=clang 
-DLLVM_USE_SPLIT_DWARF=ON -DLLVM_USE_LINKER=lld```

https://github.com/llvm/llvm-project/pull/127087
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to