Strahinja Val Markovic
67c69197d8
Refactorings and removing dead code
2012-08-11 20:13:12 -07:00
Strahinja Val Markovic
6a2f8c859c
Using -x c++ in clang opts so that headers compile
...
The problem is that clang loves to assume that .h files are in C. -x c++ gives
it a nudge in the right direction.
2012-08-11 19:46:22 -07:00
Strahinja Val Markovic
f88c9feb4f
Refactored the clang completer; many bugs fixed
...
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.
2012-08-11 19:37:08 -07:00
Strahinja Val Markovic
04c01c2ad0
Removing some commented-out code
2012-08-11 19:06:46 -07:00
Strahinja Val Markovic
3e56aea6e3
Adding our custom X_ASSERT macro
2012-08-11 19:01:40 -07:00
Strahinja Val Markovic
04c04c6bce
Not setting c++98compat warning for xcode
2012-08-11 19:00:39 -07:00
Strahinja Val Markovic
ee3ea72e3c
Not parsing llvm cmake when using external clang
...
This speeds up the cmake project regeneration.
2012-08-11 18:59:54 -07:00
Strahinja Val Markovic
f17e45bdc3
Forcing the use of move in one location
2012-08-06 20:02:46 -07:00
Strahinja Val Markovic
ddca4d0cf9
Split the CompletionData constructor into 2 funcs
2012-08-05 21:43:38 -07:00
Strahinja Val Markovic
6216eedbc9
Removing "__" from completion strings
2012-08-05 21:34:29 -07:00
Strahinja Val Markovic
0da734d393
Showing the first func def in the preview window
2012-08-05 21:13:01 -07:00
Strahinja Val Markovic
55267ceb5c
Now showing optional parameters as well
...
Also refactored CompletionData building into a constructor for CompletionData
2012-08-05 21:01:42 -07:00
Strahinja Val Markovic
5f95a2bfde
Showing preview window data for completions
...
Also, const functions have " const" correctly appended in the completion window.
2012-08-05 19:49:54 -07:00
Strahinja Val Markovic
df260ed2a8
Forcing c++ lang in clang options for ycm
2012-08-05 12:55:03 -07:00
Strahinja Val Markovic
feef67c50a
Setting rpath only for non-system, external clang
...
Setting the rpath for the system libclang was for some reason breaking the
ycm_core_tests binary. Also, rpath seems to work funky on Mac OS X.
2012-08-04 19:37:00 -07:00
Strahinja Val Markovic
a2bbbe1a4d
Code style fix
2012-08-04 19:33:28 -07:00
Strahinja Val Markovic
5646eeab5e
More null checks for data coming from clang
2012-08-04 19:29:11 -07:00
Strahinja Val Markovic
3c65c84c7b
Renaming 'indexer' to the more accurate 'ycm_core'
2012-08-04 18:59:22 -07:00
Strahinja Val Markovic
f3ddfd5458
Build option to use system libclang
2012-08-04 18:49:21 -07:00
Strahinja Val Markovic
1fd2515617
clang options file uses more succint dict syntax
2012-08-03 10:26:11 -07:00
Strahinja Val Markovic
f120c0ce1c
Showing function args right next to name now
...
The completion text in the menu is different. We used to just show the func name
in the "main" part of the completion menu, now we show the full signature
without the return type (which is shown on the right)
2012-08-02 21:37:21 -07:00
Strahinja Val Markovic
4765fd88fe
Removing some unused code + fix for crash
...
The crash was caused by clang_disposeString/getCString not checking whether the
given CXString has NULL data members. Fixed with a workaround.
2012-08-01 22:09:31 -07:00
Strahinja Val Markovic
3868f94ac7
Adding a .ycm_clang_options.py file for YCM
2012-08-01 20:50:35 -07:00
Strahinja Val Markovic
618a6acd59
Protecting ALL clang access with a mutex now
2012-08-01 20:09:01 -07:00
Strahinja Val Markovic
eab70838f0
New system for specifying clang flags
...
Now the .ycm_clang_options file is a python script that needs to implement our
API. This enables the user to do arbitrary things when computing flags.
2012-08-01 19:34:20 -07:00
Strahinja Val Markovic
11a52d018c
Protecting diagnostic access with mutex
2012-08-01 17:18:35 -07:00
Strahinja Val Markovic
11e42b49f0
Smarter updating of clang diagnostics display
2012-07-30 19:42:41 -07:00
Strahinja Val Markovic
71e3e86252
Adding option for custom extra rpath
2012-07-30 14:20:05 -07:00
Strahinja Val Markovic
333b71f8d5
Triggering syntastic error display more often
2012-07-29 22:13:42 -07:00
Strahinja Val Markovic
57bd4f7a47
Now possible to use external libclang.so
2012-07-29 20:58:04 -07:00
Strahinja Val Markovic
958a008462
Adding diagnostic extraction support
...
Next step is to add support to Syntastic so that it uses this new functionality
2012-07-28 15:27:30 -07:00
Strahinja Val Markovic
2667a82441
Now using the correct flag to warn on C++11 use
2012-07-28 11:19:26 -07:00
Strahinja Val Markovic
e46ea47df2
Replacing accidental use of C++11 auto
2012-07-27 13:52:56 -07:00
Strahinja Val Markovic
0d9d697b50
Only showing the first overloaded func signature
2012-07-26 21:44:17 -07:00
Strahinja Val Markovic
e9cf3c14b2
Not adding a '(' after a function name insert
2012-07-26 21:44:17 -07:00
Strahinja Val Markovic
3cc4cf8e10
Async clang parsing of the current file
2012-07-26 21:44:17 -07:00
Strahinja Val Markovic
cd9f40b7c0
Add missing check for threads enabled
2012-07-26 21:44:17 -07:00
Strahinja Val Markovic
13f87c5a62
Buffer identifiers are now extracted async
2012-07-24 20:09:09 -07:00
Strahinja Val Markovic
b120d6a5ba
Now extracting identifiers in C++ code
2012-07-23 20:17:59 -07:00
Strahinja Val Markovic
cdb8dfc86b
Loading .ycm_clang_options files now
...
These files can contain flags that are passed to clang.
2012-07-22 15:19:28 -07:00
Strahinja Val Markovic
b703138cac
Adding Boost.Filesystem to BoostParts
2012-07-22 15:09:50 -07:00
Strahinja Val Markovic
7bf18c7c5c
Improving IdentifierCompleter performance
...
We limit the number of candidates returned to Vim to 20 and also make sure that
we are not returning any duplicate candidates. This provides a noticeable
improvement in latency.
2012-07-21 12:06:18 -07:00
Strahinja Val Markovic
0f7f32d96f
Updating to boost 1.50
2012-07-21 11:37:40 -07:00
Strahinja Val Markovic
964c42068e
Splitting the UnsavedFile struct into its own file
2012-07-21 09:09:29 -07:00
Strahinja Val Markovic
44b671c2c0
ClangCompleter now returs extra data
...
This data is used to show more information about the completions in the
completion menu.
2012-07-19 21:17:39 -07:00
Strahinja Val Markovic
e56080ea56
Using libc++ with clang from now on
...
This also applies a patch to gtest that resolves an issue with building gtest
with libc++. The patch was taken from here:
https://groups.google.com/d/topic/googletestframework/F1B9LArL9_U/discussion
2012-07-19 21:15:25 -07:00
Strahinja Val Markovic
f76ee24316
Now only showing available completion strings
2012-07-16 20:51:21 -07:00
Strahinja Val Markovic
bcb65ec43f
Refactored the task building code for simplicity
2012-07-16 20:23:17 -07:00
Strahinja Val Markovic
c9e1706fa1
ClangCompleter now async and caches Clang data
...
First off, we don't block the GUI thread anymore for ClangCompleter (that was
always temporary). Secondly, now ClangCompleter will cache the data coming from
clang so that query-based filtering of members is fast.
2012-07-15 20:49:56 -07:00
Strahinja Val Markovic
a04c3322cc
No results for empty query (IdentifierCompleter)
2012-07-15 19:44:35 -07:00