================
@@ -4678,6 +4678,19 @@ void FieldDecl::printName(raw_ostream &OS, const
PrintingPolicy &Policy) const {
DeclaratorDecl::printName(OS, Policy);
}
+const FieldDecl *FieldDecl::FindCountedByField() const {
+ const auto *CAT = getType()->getAs<CountAttributedType>();
+ if (!CAT)
+ return nullptr;
+
+ const auto *CountDRE = cast<DeclRefExpr>(CAT->getCountExpr());
----------------
Sirraide wrote:
This is only tangentially related to this patch and should probably be a
separate investigation, but is there a reason why we’re not storing a DRE in
the `CountAttributedType` instead of just an `Expr` (because we check that it
is a DRE when we create the type)?
https://github.com/llvm/llvm-project/pull/102549
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits