]> granicus.if.org Git - clang/commit
Remove the only use of LookupResult's implicit copy ctor
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 28 Sep 2015 23:48:55 +0000 (23:48 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 28 Sep 2015 23:48:55 +0000 (23:48 +0000)
commit47af8de8a71edbb0cf7974b9ce0b25167745e66f
treec5cd5e8287dbf8721e33f703b8daae5e744abb88
parent1fa398ce2e03d565bcd327da133a2f25b1fd8488
Remove the only use of LookupResult's implicit copy ctor

LookupResult should not be copyable, it's not readily copyable and can
only be copied when it's in specific states (in a query state, without
any results, basically). Instead, just extract the /query/ state and
pass that across the copy boundary, then build a new LookupResult on the
other side.

I wonder if a better API (one in which the query state is separate from
the result state - essentialyl making QueryState a first class part of
the Lookup API - pass a QueryState, get a LookupResult, rather than
mutating the LookupResult in place (LookupResult could contain a
QueryState if it's particularly helpful to be able to observe the query
parameters while also examining the result)) might be a good idea here.

Future patches will probably make LookupResult actually non-copyable
(transition the CXXBasePaths to unique_ptr, for example) and hopefully
we'll enable -Wdeprecated in LLVM soon to avoid issues like this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248761 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprMember.cpp