[PATCH] D70257: [BPF] Restrict preserve_access_index attribute to C only
Yonghong Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 14 14:16:42 PST 2019
yonghong-song marked an inline comment as done.
yonghong-song added inline comments.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:3431
- const auto *RecT = dyn_cast<RecordType>(ElaborateT->desugar().getTypePtr());
- if (!RecT)
- return false;
-
- return RecT->getDecl()->hasAttr<BPFPreserveAccessIndexAttr>();
+ const auto *PointeeT = PtrT->getPointeeType().getTypePtr()
+ ->getUnqualifiedDesugaredType();
----------------
aaron.ballman wrote:
> You can drop the `getTypePtr()` here and just use the magic `->` overload.
Thanks! This indeed better:
```
+ const auto *PointeeT = PtrT->getPointeeType()
+ ->getUnqualifiedDesugaredType();
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70257/new/
https://reviews.llvm.org/D70257
More information about the cfe-commits
mailing list