[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 07:50:23 PST 2023


xazax.hun accepted this revision.
xazax.hun added a comment.

This is a big improvement, I skimmed through it and looks good to me. There might be some sneaky ways to change values of fields without mentioning them, e.g., casting a pointer to a struct to an array of chars. But I think reasoning about those scenarios is probably not something we want to model anytime soon.

Another pesky scenario when we are not doing context sensitive analysis:

  int* pointsToField = getField(myObj);

But this can be handled correctly in a conservative way buy treating `myObj' as escaped. Overall, I dont anticipate any blockers at the moment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140694



More information about the cfe-commits mailing list