ahatanak added inline comments.
================ Comment at: lib/Sema/SemaInit.cpp:1827-1829 + if (SemaRef.DiagnoseUseOfDecl(Destructor, Loc)) + return false; + return true; ---------------- rsmith wrote: > Usual Clang convention is to return `true` on error. I also renamed the function to hasAccessibleDestructor to make it clearer what the function does. ================ Comment at: lib/Sema/SemaInit.cpp:1856 + if (auto *CXXRD = DeclType->getAsCXXRecordDecl()) { + SourceLocation Loc = IList->getBeginLoc(); + for (auto &Base : Bases) ---------------- rsmith wrote: > It's a minor thing, but I think it'd be preferable to point the diagnostic at > the relevant init list element, or at the close brace if the initializer was > omitted. The function that checks the destructor (hasAccessibleDestructor) is called in five different places now. Repository: rC Clang https://reviews.llvm.org/D45898 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits