[PATCH] D40948: Switch Clang's default C++ language target to C++14

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 13:13:47 PST 2017


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM with the PS4 comment removed. Thank you!

Please also update the documentation and the release notes.



================
Comment at: clang/test/CodeGenCXX/vtable-available-externally.cpp:275
 struct C {
   virtual D& operator=(const D&);
 };
----------------
t.p.northover wrote:
> rsmith wrote:
> > To make this test work in C++11 onwards, you need to add a virtual move assignment operator here:
> > 
> > ```
> > virtual D& operator=(D&&);
> > ```
> That didn't quite work. The issue appears to be that D has both of those implicitly defined in C++14 mode, but only the move assignment operator is used below. Speculative VTable emission requires all of them to be used.
> 
> So adding a "d = d;" line to the second g function fixes the test. Does that sound sane to you, or am I missing the point?
This sounds like a good approach, thanks.


Repository:
  rC Clang

https://reviews.llvm.org/D40948





More information about the cfe-commits mailing list