aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM, though you should add a release note as well. ================ Comment at: clang/lib/Sema/SemaExprMember.cpp:164-167 if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) contextClass = MD->getParent()->getCanonicalDecl(); - else + else if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC)) contextClass = cast<CXXRecordDecl>(DC); ---------------- ================ Comment at: clang/test/SemaCXX/statements.cpp:60-61 + int i; + int j = ({i;}); // expected-error {{invalid use of non-static data member 'i'}} + // expected-error@-1 {{cannot initialize a member subobject of type 'int' with an rvalue of type 'void'}} + // expected-warning@-2 {{use of GNU statement expression extension}} ---------------- This diagnostic isn't entirely unreasonable, but I think GCC gives a better diagnostic: https://godbolt.org/z/T4dbhnoo7 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142490/new/ https://reviews.llvm.org/D142490 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits