Author: dblaikie
Date: Thu Aug 13 18:15:20 2015
New Revision: 244983

URL: http://llvm.org/viewvc/llvm-project?rev=244983&view=rev
Log:
Wdeprecated: Make Filter safely move constructible.

makeFilter returns Filters by value which seems to be only safe when the
copy doesn't occur and RVO kicks in. Make the object safely movable to
support this more reliably.

Modified:
    cfe/trunk/include/clang/Sema/Lookup.h

Modified: cfe/trunk/include/clang/Sema/Lookup.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=244983&r1=244982&r2=244983&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Lookup.h (original)
+++ cfe/trunk/include/clang/Sema/Lookup.h Thu Aug 13 18:15:20 2015
@@ -575,6 +575,11 @@ public:
     {}
 
   public:
+    Filter(Filter &&F)
+        : Results(F.Results), I(F.I), Changed(F.Changed),
+          CalledDone(F.CalledDone) {
+      F.CalledDone = true;
+    }
     ~Filter() {
       assert(CalledDone &&
              "LookupResult::Filter destroyed without done() call");


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

Reply via email to