c-index-test?

The Index/c-index-api-test.m test is referencing a c-index-test program, but the project directory I find for it at clang/tools/c-index-test has a CMakeLists.txt file that has the MSVC build disabled.

Is this a work in progress?

What should I do? Just ignore this test for now, or do you need some help with it?

-John

The Index/c-index-api-test.m test is referencing a c-index-test program, but the project directory I find for it at clang/tools/c-index-test has a CMakeLists.txt file that has the MSVC build disabled.

Is this a work in progress?

Yes.

What should I do? Just ignore this test for now, or do you need some help with it?

Feel free to enable it for MSVC if you’d like.

snaroff

We could use some help with it. If you enable c-index-test, you’ll run into the problem described here:

http://llvm.org/bugs/show_bug.cgi?id=5051

where we are missing dllimport/dllexport markers on the functions in libCIndex. There’s even a patch there (probably a little bit stale) that I can’t evaluate because I don’t have a Windows machine handy.

  • Doug

Question: Why does this library need to be a shared library? It seems all the other libraries are not.

The missing basename symbol is a problem. I took a guess that it returns a pointer to the base part of a file path (i.e. given “/path/basename.ext”, it will return a pointer to the “basename.ext” part), but the test still fails. I’ll look into it more later today.

What is this app for?

-John

Question: Why does this library need to be a shared library? It seems all the other libraries are not.

Yes. This library differs from the other libraries in that it vends a stable C API instead of an internal C++ API. This shared library is intended be used as a component of other software that wishes to use Clang through a stable interface but not be directly exposed to Clang's internal implementation.

We already have a precedent for a shared library in LLVM: lto. I'm not certain if that builds on Windows or not. If it doesn't, we can always disable building the CIndex shared library on Windows until someone cares to support it on that platform.

The missing basename symbol is a problem. I took a guess that it returns a pointer to the base part of a file path (i.e. given "/path/basename.ext", it will return a pointer to the "basename.ext" part), but the test still fails. I'll look into it more later today.

Thanks!

What is this app for?

The shared library is meant to service a general purpose, relatively stable C API (in evolution) for building applications on top of Clang that want to perform some kind of reasoning about source code without directly interacting with Clang's internals.

Yes, it's can be build!

Wonderful! Great to know!