orivej added a comment.

I have noticed that this change breaks seemingly valid code:

  class A { protected: ~A(); };
  struct B : A {};
  B f() { return B(); }
  B g() { return {}; }

`f` compiles, but `g` fails with `temporary of type 'A' has protected 
destructor`. (g++ 8.2 compiles this file.)


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D45898/new/

https://reviews.llvm.org/D45898



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to