[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
Thu Jan 5 09:14:30 PST 2023


xazax.hun added a comment.

I realized I did not say this explicitly in my previous comment, but feel free to commit :)



================
Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:267
 
+  void addFieldsReferencedInScope(llvm::DenseSet<const FieldDecl *> Fields);
+
----------------
Is there any scenario where check authors might invoke this function? If no, I wonder if it would be better to make this private and make Environment a friend of this class. Keeping the number of public methods minimal could be a great service to future check authors.


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