[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

Piotr Fusik via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 07:39:53 PDT 2023


pfusik wrote:

> I'd be inclined to move the test to clang/test/Parser/ because even though the fix is in Sema, it's testing a wrong parse.

It's an ICE in Sema. The test is identical to the bug report, but it doesn't mean the issue is limited to syntax errors.

```cpp
int main() {
    []()__attribute__((b(({ return 0; })))){};
}
```

g++ accepts the above while Clang crashes. I'll add this as a second test.

https://github.com/llvm/llvm-project/pull/66643


More information about the cfe-commits mailing list