[cfe-commits] r169571 - /cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
Jordan Rose
jordan_rose at apple.com
Fri Dec 7 10:45:30 PST 2012
On Dec 7, 2012, at 10:36 , Ted Kremenek <kremenek at apple.com> wrote:
> On Dec 7, 2012, at 10:23 AM, Ted Kremenek <kremenek at apple.com> wrote:
>
>> On Dec 7, 2012, at 9:36 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>>
>>>> + RegionBindingsRef &operator=(const RegionBindingsRef &X) {
>>>> + *static_cast<ParentTy*>(this) = X;
>>>> + return *this;
>>>> + }
>>>
>>> This is the default copy-constructor; better to leave it out.
>>
>> Remove it, and you will see that the source doesn't compile. :-)
>
> Specifically:
>
> RegionStore.cpp:141:7: error: cannot define the implicit default assignment operator for '<anonymous>::RegionBindingsRef', because non-static reference member 'CBFactory' can't use default assignment operator
> class RegionBindingsRef : public llvm::ImmutableMapRef<const MemRegion *,
I see the difference; we're not copying CBFactory. That kind of scares me, even though it's exceedingly unlikely that we'll ever attempt to assign one RegionBindingsRef to another with a different RegionStoreManager. We should probably make it a pointer instead of a reference.
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121207/eb5197d5/attachment.html>
More information about the cfe-commits
mailing list