[clang] [Clang] Add __builtin_get_counted_by builtin (PR #102549)
Bill Wendling via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 14:04:39 PDT 2024
================
@@ -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());
----------------
bwendling wrote:
See https://github.com/llvm/llvm-project/pull/104235
https://github.com/llvm/llvm-project/pull/102549
More information about the cfe-commits
mailing list