[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 7 15:19:06 PDT 2024


================
@@ -1095,6 +1095,8 @@ class StructAccessBase
     return Visit(E->getBase());
   }
   const Expr *VisitCastExpr(const CastExpr *E) {
+    if (E->getCastKind() == CK_LValueToRValue)
+      return E;
----------------
efriedma-quic wrote:

Should this be `return IsExpectedRecordDecl(E) ? E : nullptr;`?

https://github.com/llvm/llvm-project/pull/110497


More information about the cfe-commits mailing list