[clang] [Clang][counted_by] Honor counted_by in __bdos on direct struct access (PR #201161)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 11:47:18 PDT 2026
================
@@ -16276,13 +16276,44 @@ static bool determineEndOffset(EvalInfo &Info, SourceLocation ExprLoc,
return true;
}
+/// Determine whether @p E designates a flexible array member annotated with
+/// 'counted_by'. This mirrors the Expr-walking that CGBuiltin's
+/// StructFieldAccess / emitCountedByMemberSize do to decide whether to emit
----------------
JustinStitt wrote:
as in, I'd expect `__bdos(&af.fam, 1)` and `__bdos(af.fam, 1)` to eventually arrive at the same size in the IR. is this the case?
https://github.com/llvm/llvm-project/pull/201161
More information about the cfe-commits
mailing list