[cfe-dev] Selector::getAsString problem in CIndex

John Thompson john.thompson.jtsoftware at gmail.com
Mon Oct 19 12:14:16 PDT 2009


I'm looking at a test failure of c-index-api-test.m on Windows, and I've run
into a problem I don't know how to easily fix.

In the function Selector::getAsString function in IdentifierTable.cpp at
line 330:

    return II->getName().str() + ":";

On Windows, at least, this isn't working as expected.  I think
it's because a tempory string created gets destructed before the return
completes, causing the resulting string pointer to point to garbage,
resulting in garbage for the identifier name in the index output.

If someone more knowlegeable about it could take a look at it, I'd
appreciate it.

Note that if you need to run it on windows, you'll need some CIndex changes
I'm working on, but haven't completed yet, so let me know if you need them.

-John

-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091019/a30d599a/attachment.html>


More information about the cfe-dev mailing list