[PATCH] D153852: [clang][dataflow] Initialize fields of anonymous records correctly.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 28 06:18:58 PDT 2023


mboehme marked an inline comment as done.
mboehme added inline comments.


================
Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:356
+      Member = cast<FieldDecl>(I);
+      MemberLoc = &cast<AggregateStorageLocation>(MemberLoc)->getChild(*Member);
+    }
----------------
gribozavr2 wrote:
> Is there a chance that there will be no such child if we hit one of our limits for modeling recursive data structures?
Happily, this isn't a concern. `AggregateStorageLocation`s always contain the same set of fields (the ones that are "modeled", i.e. accessed in some way). And this is a nice invariant to have.

Where we do the cutoff for modeling recursive data structures is that the storage location returned by `getChild()` may not have a `Value` associated with it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153852/new/

https://reviews.llvm.org/D153852



More information about the cfe-commits mailing list