[clang] [clang-tools-extra] [clang] Complete fields in __builtin_offsetof designators (PR #195126)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Thu May 7 03:52:07 PDT 2026


================
@@ -1670,6 +1675,11 @@ bool ResultBuilder::IsMember(const NamedDecl *ND) const {
          isa<ObjCPropertyDecl>(ND);
 }
 
+bool ResultBuilder::IsField(const NamedDecl *ND) const {
+  ND = ND->getUnderlyingDecl();
+  return isa<FieldDecl>(ND) || isa<IndirectFieldDecl>(ND);
----------------
zwuis wrote:

```cpp
isa<FieldDecl, IndirectFieldDecl>(ND)
```

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


More information about the cfe-commits mailing list