================ @@ -324,6 +336,12 @@ getFieldsGlobalsAndFuncs(const Stmt &S, FieldSet &Fields, } else if (auto *E = dyn_cast<DeclRefExpr>(&S)) { insertIfGlobal(*E->getDecl(), Vars); insertIfFunction(*E->getDecl(), Funcs); + } else if (const auto *C = dyn_cast<CXXMemberCallExpr>(&S)) { + // If this is a method that returns a member variable but does nothing else, + // model the field of the return value. + if (MemberExpr *E = dyn_cast_or_null<MemberExpr>( ---------------- martinboehme wrote:
Maybe include the cast to `MemberExpr` in `getRetValueFromSingleReturnStmtMethod()`? This would put all of the checking in a single function and make the callsite here cleaner. The function should then be renamed to something like `getMemberForAccessor()`. https://github.com/llvm/llvm-project/pull/66368 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits