mboehme marked 2 inline comments as done. mboehme added a comment. PTAL
================ Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:305 + if (Field->isAnonymousStructOrUnion()) + getFieldsFromClassHierarchy(Field->getType(), Fields); + else ---------------- gribozavr2 wrote: > Could we somehow take advantage of the IndirectFieldDecl instead of recursing > ourselves? Seems like that way we would be delegating to Clang the questions > of the name injection/lookup. Thanks for pointing this out. I realized I was really working against the grain of the Clang AST. I've changed this patch so that it merely adds a new test (to demonstrate that we are already representing fields of anonymous records correctly). The thing that actually needs to be fixed is the handling of `CXXCtorInitializer`; I'll do this in a followup patch. ================ Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:5427 + const ValueDecl *SDecl = findValueDecl(ASTCtx, "s"); + const ValueDecl *IDecl = findValueDecl(ASTCtx, "i"); + ---------------- gribozavr2 wrote: > Could we make some stronger assertion to prove that the transfer function > works? It seems to me that getChild() by itself does not prove that. > > For example, store and load the value and assert that it is the same. Good point, done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153409/new/ https://reviews.llvm.org/D153409 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits