[cfe-dev] fix for Clang PR 8419
Zhanyong Wan (λx.x x)
wan at google.com
Fri Nov 19 22:11:45 PST 2010
Hi Zhongxing,
On Fri, Nov 19, 2010 at 7:45 PM, Zhongxing Xu <xuzhongxing at gmail.com> wrote:
>> One question: for the purpose of the CFG builder, does an LValue have
>> to be mutable? For example, given
>>
>> void Foo(const Bar& x) { ... }
>> Bar& GetBar() { ... }
>>
>> when the analyzer sees "Foo(GetBar());", should it treat "GetBar()" as
>> an LValue or RValue? What if the implementation of Foo() actually
>> cares about the identity of the input, e.g.
>>
>> void Foo(const Bar& x) {
>> if (&x == &someGlobalBarVairalbe)
>> ...;
>> }
>>
>> ? Thanks.
>
> In this context, we evaluate GetBar() to its l-value, i.e., a MemRegion.
Thanks for the answer.
--
Zhanyong
More information about the cfe-dev
mailing list