rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land.
LGTM with a couple of tweaks. ================ Comment at: lib/CodeGen/CGCXX.cpp:45-46 @@ +44,4 @@ + // an alias, unless this class owns no members. + unsigned totalFields = + std::distance(D->getParent()->field_begin(), D->getParent()->field_end()); + if (getCodeGenOpts().SanitizeMemoryUseAfterDtor && totalFields > 0) ---------------- You can just use `!D->getParent()->field_empty()` ================ Comment at: lib/CodeGen/CGClass.cpp:1289 @@ -1288,7 +1288,3 @@ -static bool -FieldHasTrivialDestructorBody(ASTContext &Context, const FieldDecl *Field); - -static bool -HasTrivialDestructorBody(ASTContext &Context, +bool CodeGenModule::HasTrivialDestructorBody(ASTContext &Context, const CXXRecordDecl *BaseClassDecl, ---------------- I think you no longer need to make these functions members. http://reviews.llvm.org/D12022 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits