[cfe-dev] CIndex changes

Ted Kremenek kremenek at apple.com
Tue Oct 27 16:59:45 PDT 2009


Thanks John.  The patch makes it very clear.

The problem is that we don't want to add static data to CIndex, as we  
want the functions to be as reentrant as possible.

Steve/Doug: I believe you guys discussed this one.  Comments?

On Oct 27, 2009, at 2:51 PM, John Thompson wrote:

> Thanks, Ted.
>
> I'm sorry I've been disconnected from this.  What particular code  
> were you looking at that returned a 'const char*' that referred to  
> the buffer associated with a temporary std::string?
> It's in clang_getTranslationUnitSpelling, clang_getDeclSpelling, and  
> clang_getCursorSpelling.  The enclosed patch with my hacky work- 
> around will show the specific places.
>
> I also moved getLocationFromCursor to fix a VC++ message about the  
> return type not being permitted inside an extern "C" {} block.
> -John
>
> -- 
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
> <cindex_strings.patch>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091027/67263b24/attachment.html>


More information about the cfe-dev mailing list