[clang-tools-extra] [clangd] Resolve __builtin_offsetof designator components precisely (PR #194407)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 28 07:57:34 PDT 2026
https://github.com/ArcsinX commented:
Keeping `VisitOffsetOfExpr()` leads to incorrect behavior when GTD/hover on `__builtin_offsetof` itself, returning field target
E.g.
```cpp
struct S {
int f;
};
__builtin_o^ffsetof(struct S, f);
```
Hover/GTD at `^` position gives `f` field
https://github.com/llvm/llvm-project/pull/194407
More information about the cfe-commits
mailing list