Displaying 2 results from an estimated 2 matches for "clang_createindex".
2014 Jun 07
5
[LLVMdev] Multi-threading and mutexes in LLVM
...upport are the following:
* It leads to confusing code. At any given point, is multi-threading
enabled or disabled? You never know without calling llvm_is_multithreaded,
but even calling that is inherently racy, because someone else could
disable it after it returns.
* It leads to subtle bugs. clang_createIndex, the first time it's called,
enables multi-threading. What happens if someone else disables it later?
Things like this shouldn't even be possible.
* Not all platforms even support threading to begin with. This works now
because llvm_start_multithreaded(), if the compile time flag is set...
2012 Aug 16
2
[LLVMdev] libclang parsing bug
...e impression that
no one reads that :)). If I try to use clang_parseTranslationUnit on this
code below:
int main() { return reinterpret_cast
libclang crashes.
This is the code I used to parse the code above:
#include <clang-c/Index.h>
int main(int argc, char** argv)
{
CXIndex index = clang_createIndex(0, 0);
CXTranslationUnit translationUnit = clang_parseTranslationUnit(index,
0, argv, argc, 0, 0, CXTranslationUnit_None);
clang_disposeTranslationUnit(translationUnit);
clang_disposeIndex(index);
return 0;
}
Am I doing anything wrong?
Here's the output from valgrind:
$ valg...