On Nov 18, 2008, at 12:46 AM, Sebastian Redl wrote:

> Chris Lattner wrote:
>> This is a somewhat tricky dance, but it means that the accumulated  
>> DiagnosticInfo is allowed to keep pointers to other expression  
>> temporaries without those pointers getting invalidated.
>>
> Are you sure? If the DiagnosticInfo is constructed earlier than the  
> other temporaries, wouldn't it be destroyed *after* them?

No, I'm not absolutely certain.

If I have:

foo(...).bar(a+b);

I don't see a sequence point between the call to foo (which creates  
the DiagnosticInfo object) and the evaluation of a+b.

I will work up a fix for this after I convert over the rest of sema to  
use the new interface.  It won't change the interface, but will copy  
the strings into the object as Doug also requested.

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

Reply via email to