================
@@ -1136,38 +1136,19 @@ llvm::Value *CodeGenFunction::EmitCountedByFieldExpr(
}
const FieldDecl *CodeGenFunction::FindCountedByField(const FieldDecl *FD) {
- if (!FD || !FD->hasAttr<CountedByAttr>())
+ if (!FD)
return nullptr;
- const auto *CBA = FD->getAttr<CountedByAttr>();
- if (!CBA)
+ auto *CAT = FD->getType()->getAs<CountAttributedType>();
----------------
AaronBallman wrote:
```suggestion
const auto *CAT = FD->getType()->getAs<CountAttributedType>();
```
Same edits elsewhere in this function.
https://github.com/llvm/llvm-project/pull/78000
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits