f88c9feb4f
This change should fix the random hangs and segfaults when using the clang completer. Also, assertion errors printed to the console on vim exit should go away too, same thing with segfaults on vim exit. These "on exit" errors were caused by not cleanly shutting down the background threads; both the identifier completer and the clang one now join the threads on destruction. This results in a clean shutdown. The new clang completer architecture now uses only one clang thread (again) instead of a completion and parsing thread. Since the parsing task needs to wait on the completion task if it was started first (and vice-versa) there's no point to using two threads. The desired "simplicity" of using two threads for these two tasks actually created needless complexity (and bugs). Sigh. Such is life. A TranslationUnit abstraction was also created and this in turn also reduces the complexity of the clang completer. The clang completer now also has some (very) basic tests.
13 lines
127 B
C++
13 lines
127 B
C++
struct Foo {
|
|
int x;
|
|
int y;
|
|
char c;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
Foo foo;
|
|
// The location after the dot is line 11, col 7
|
|
foo.
|
|
}
|