diff options
author | Dave Lee <davelee.com@gmail.com> | 2022-01-15 10:20:02 -0800 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2022-01-15 10:20:52 -0800 |
commit | a7e7f541c0813e9d3f6c641ad8ff89619ec749d8 (patch) | |
tree | 6bcac28f8458e29593a13d37ffa9918dd8825dac /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | ff85dcb1c5b01411a6f9f2dc4c0e087467411f50 (diff) | |
download | llvm-a7e7f541c0813e9d3f6c641ad8ff89619ec749d8.zip llvm-a7e7f541c0813e9d3f6c641ad8ff89619ec749d8.tar.gz llvm-a7e7f541c0813e9d3f6c641ad8ff89619ec749d8.tar.bz2 |
[lldb] Remove anon struct from frame-var-anon-unions test
This test for anonymous unions seems off. It tests the following:
```
union {
// fields
};
struct {
// fields
} var{...};
```
Both are anonymous types, but the first does not declare a variable and the
second one does. The test then checks that `frame var` can directly access the
fields of the anonymous union, but can't directly access the fields of the
anonymous struct variable.
The second test, to directly access the members of the struct variable, seems
pointless as similar code would not compile. A demonstration:
```
struct {
int a;
int z;
} a_z{23, 45};
printf("%d\n", a_z.a); // fine
printf("%d\n", a); // this does not compile
```
Since we can't directly access the fields in code, I'm not sure there's a
reason to test that lldb also can't directly access them (other than perhaps as
a regression test).
Differential Revision: https://reviews.llvm.org/D116863
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions