On Dec 7, 2012, at 10:45 AM, Jordan Rose <[email protected]> wrote:

> 
> On Dec 7, 2012, at 10:36 , Ted Kremenek <[email protected]> wrote:
> 
>> On Dec 7, 2012, at 10:23 AM, Ted Kremenek <[email protected]> wrote:
>> 
>>> On Dec 7, 2012, at 9:36 AM, Jordan Rose <[email protected]> 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.

I'm fine with changing it to a pointer value.  It will likely have no 
performance impact.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to