r244983 - Wdeprecated: Make Filter safely move constructible.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 16:15:21 PDT 2015
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");
More information about the cfe-commits
mailing list