rsmith added a comment.

Thanks!



================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4091
   "%select{rvalue|lvalue}1">;
+def ext_pointer_to_const_ref_member_on_rvalue : ExtWarn<
+  "pointer-to-member to const& function on an rvalue is a C++2a extension">,
----------------
I would be inclined to use an `Extension` rather than an `ExtWarn` for this. (I 
really don't see why we didn't move this as a DR -- it seems to be obviously a 
defect rather than an extension to me.)


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4092
+def ext_pointer_to_const_ref_member_on_rvalue : ExtWarn<
+  "pointer-to-member to const& function on an rvalue is a C++2a extension">,
+  InGroup<CXX20>;
----------------
Hmm, this seems hard to express clearly and concisely. How about something like:

"invoking a pointer to a 'const &' member function on an rvalue is a C++2a 
extension"


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4093
+  "pointer-to-member to const& function on an rvalue is a C++2a extension">,
+  InGroup<CXX20>;
+def warn_cxx17_compat_pointer_to_const_ref_member_on_rvalue : Warning<
----------------
Please mark this as `SFINAEFailure` too; if we're going to reject under 
`-pedantic-errors`, we should also treat it as SFINAEable.


https://reviews.llvm.org/D36855



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

Reply via email to