[cfe-commits] r59502 - in /cfe/trunk: Driver/ include/clang/Analysis/ include/clang/Analysis/PathSensitive/ include/clang/Basic/ include/clang/Driver/ lib/Analysis/ lib/Basic/ lib/CodeGen/ lib/Driver/ lib/Lex/ lib/Parse/ lib/Sema/

Chris Lattner clattner at apple.com
Tue Nov 18 20:08:14 PST 2008

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:


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.


More information about the cfe-commits mailing list