================ @@ -156,6 +153,49 @@ void PreferMemberInitializerCheck::check( const CXXRecordDecl *Class = Ctor->getParent(); bool FirstToCtorInits = true; + std::map<const FieldDecl *, AssignedLevel> AssignedFields{}; + + // Checks if Field is initialised using a field that will be initialised after + // it. + // TODO: Probably should guard against function calls that could have side + // effects or if they do reference another field that's initialized before + // this field, but is modified before the assignment. + auto UpdateAssignmentLevel = [Ctor, &AssignedFields](const FieldDecl *Field, ---------------- PiotrZSL wrote:
Move this lambda to separate method, this method is already big. https://github.com/llvm/llvm-project/pull/70316 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits