Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-09 Thread Adrian Prantl via cfe-commits
> On Dec 8, 2016, at 7:31 PM, Duncan P. N. Exon Smith > wrote: > > >> On 2016-Dec-08, at 19:29, Richard Smith wrote: >> >> On 8 Dec 2016 7:17 pm, "Duncan P. N. Exon Smith via cfe-commits" >> wrote: >> +Eric, Marshall >> >> I haven't looked, but: from the test name, "copy.fail.cpp", I susp

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-08 Thread Duncan P. N. Exon Smith via cfe-commits
> On 2016-Dec-08, at 19:29, Richard Smith wrote: > > On 8 Dec 2016 7:17 pm, "Duncan P. N. Exon Smith via cfe-commits" > wrote: > +Eric, Marshall > > I haven't looked, but: from the test name, "copy.fail.cpp", I suspect there > is a bug/incompatibility in the test. It likely relies on the co

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-08 Thread Duncan P. N. Exon Smith via cfe-commits
Hmm, never mind. The test seems to preclude copy elision if I'm looking in the right place: std::streambuf &get(); int main() { std::streambuf sb = get(); // expected-error } > On 2016-Dec-08, at 19:17, Duncan P. N. Exon Smith via cfe-commits > wrote: > > +Eric, Marshall > > I haven't

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-08 Thread Richard Smith via cfe-commits
On 8 Dec 2016 7:17 pm, "Duncan P. N. Exon Smith via cfe-commits" < cfe-commits@lists.llvm.org> wrote: +Eric, Marshall I haven't looked, but: from the test name, "copy.fail.cpp", I suspect there is a bug/incompatibility in the test. It likely relies on the compiler trying (and failing) to copy so

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-08 Thread Duncan P. N. Exon Smith via cfe-commits
+Eric, Marshall I haven't looked, but: from the test name, "copy.fail.cpp", I suspect there is a bug/incompatibility in the test. It likely relies on the compiler trying (and failing) to copy something in a context where r288866 guarantees that there is no copy. > On 2016-Dec-08, at 18:00, Ad

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-08 Thread Adrian Prantl via cfe-commits
Hi Richard, at this point this is more a heads-up than anything actionable, but I wanted to let you know that I bisected this bot failure (http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2721/consoleFull#10584592348254eaf0-7326-4999-85b0-388101f2d404) of std/input.output/strea

r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 6 17:52:28 2016 New Revision: 288866 URL: http://llvm.org/viewvc/llvm-project?rev=288866&view=rev Log: [c++17] P0135R1: Guaranteed copy elision. When an object of class type is initialized from a prvalue of the same type (ignoring cv qualifications), use the prvalue