diff options
author | Yuxuan Chen <ych@fb.com> | 2024-08-19 14:06:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 14:06:10 -0700 |
commit | e732d1ce86783b1d7fe30645fcb30434109505b9 (patch) | |
tree | 2848d26f19ba8d5be21811a014d8e9675d052ba1 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | ff2e619dfcd77328812a42d2ba2b11c3ff96f410 (diff) | |
download | llvm-e732d1ce86783b1d7fe30645fcb30434109505b9.zip llvm-e732d1ce86783b1d7fe30645fcb30434109505b9.tar.gz llvm-e732d1ce86783b1d7fe30645fcb30434109505b9.tar.bz2 |
[Clang] Fix ICE in SemaOpenMP with structured binding (#104822)
Fixes https://github.com/llvm/llvm-project/issues/104810.
Clang currently crashes on the following program:
```
struct S {
int i;
};
auto [a] = S{1};
void foo() {
a;
}
```
when `-fopenmp` is enabled.
Because `a` is neither `VarDecl` nor `FieldDecl`. It's a `BindingDecl`
that's not handled in `SemaOpenMP.cpp`'s `getCanonicalDecl`. It appears
to me that this pattern matching is merely just for a refined return
type of the overrides. It can also be achieved with just using the
virtual `Decl::getCanonicalDecl()` instead. Do the final casting should
be safe for `ValueDecl`s.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
0 files changed, 0 insertions, 0 deletions