<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 12, 2016 at 3:42 PM, don hinton via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hintonda created this revision.<br>
hintonda added a reviewer: rjmccall.<br>
hintonda added a subscriber: cfe-commits.<br>
<br>
Fix implicit copy ctor and copy assignment operator warnings<br>
when -Wdeprecated passed.<br>
<br>
<a href="http://reviews.llvm.org/D18123" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18123</a><br>
<br>
Files:<br>
include/clang/AST/UnresolvedSet.h<br>
include/clang/Sema/Lookup.h<br>
<br>
Index: include/clang/Sema/Lookup.h<br>
===================================================================<br>
--- include/clang/Sema/Lookup.h<br>
+++ include/clang/Sema/Lookup.h<br>
@@ -185,6 +185,9 @@<br>
Shadowed(false)<br>
{}<br>
<br>
+ LookupResult(const LookupResult &) = default;<br>
+ LookupResult & operator=(const LookupResult &) = default;<br></blockquote><div><br></div><div>Pretty sure LookupResult should not be copyable - I've been meaning to get around to fixing this -Wdeprecated regression introduced by copinig LookupResult<br><br>(if you look at LookupResult's dtor, you can see that it's not really copyable - if it has paths, you'll cause double deletion if you copy it - or double diagnosis, etc - in the one other place where I came across a LookupResult copy, I just pulled uot all the lookup query parameters and passed those into a new LookupResult - probably better off splitting it into the query portion and the result portion and keeping the query portion copyable)<br><br>If you check my commits related to this warning, you should find a change I made to delayed typo correction that fixed a similar LookupResult copy using the mechanism I described.<br><br>Thanks,<br>- Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
~LookupResult() {<br>
if (Diagnose) diagnose();<br>
if (Paths) deletePaths(Paths);<br>
Index: include/clang/AST/UnresolvedSet.h<br>
===================================================================<br>
--- include/clang/AST/UnresolvedSet.h<br>
+++ include/clang/AST/UnresolvedSet.h<br>
@@ -59,8 +59,9 @@<br>
// UnresolvedSet.<br>
private:<br>
template <unsigned N> friend class UnresolvedSet;<br>
- UnresolvedSetImpl() {}<br>
- UnresolvedSetImpl(const UnresolvedSetImpl &) {}<br>
+ UnresolvedSetImpl() = default;<br>
+ UnresolvedSetImpl(const UnresolvedSetImpl &) = default;<br>
+ UnresolvedSetImpl& operator=(const UnresolvedSetImpl &) = default;<br>
<br>
public:<br>
// We don't currently support assignment through this iterator, so we might<br>
<br>
<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>