Commit Graph

245 Commits

Author SHA1 Message Date
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
Strahinja Val Markovic
52d8a1236b If query empty, Results sorted lexicographically
This change was also the root cause of the crash bug I spent two days tracking
down. The problem was that the new bool member was not added to the custom copy
ctor... since we don't really need a custom copy ctor for Result, we're going
with the compiler-provided one.
2012-07-15 19:40:24 -07:00
Strahinja Val Markovic
20f0d2a280 Removing some unused aliases 2012-07-12 20:55:00 -07:00
Strahinja Val Markovic
ce23b5ca55 Moving the LatestTask typedef to Future.h 2012-07-12 20:54:40 -07:00
Strahinja Val Markovic
81811964c3 Improving UnsavedFile operator== 2012-07-12 20:54:08 -07:00
Strahinja Val Markovic
27e1400558 ClangComplete now sorts completions based on query 2012-07-11 22:41:32 -07:00
Strahinja Val Markovic
52b1b9f660 More forward decls instead of includes 2012-07-11 22:14:28 -07:00
Strahinja Val Markovic
dad2fc31bb Replacing a header file with a forward decl 2012-07-11 22:10:37 -07:00
Strahinja Val Markovic
be0085aca9 CandidateRepository is used for Candidate storage
This will make it easy to use the same Candidates for both the
IdentifierCompleter and the ClangCompleter, thereby reducing memory consumption
and increasing performance.
2012-07-11 22:08:04 -07:00
Strahinja Val Markovic
f25c3d90f7 Removing unused file 2012-07-11 21:41:39 -07:00
Strahinja Val Markovic
39ecf76798 Renamed ClangComplete to ClangCompleter 2012-07-10 23:28:58 -07:00
Strahinja Val Markovic
545792c055 Renaming Completer to IdentifierCompleter 2012-07-10 23:13:12 -07:00
Strahinja Val Markovic
94288108d8 Initial, rough kinda working version ClangComplete
Many things need to be ironed out still.
2012-07-10 15:26:07 -07:00
Strahinja Val Markovic
1df2a5d360 Using cmake_cxx_flags instead of add_definitions 2012-07-09 13:58:56 -07:00
Strahinja Val Markovic
0a553bf23c Building in c++11 mode where available 2012-07-08 17:55:14 -07:00
Strahinja Val Markovic
30c9637992 Using the vector indexing suite from Boost.Python
This removes the need for a special overload for AddCandidatesToDatabase. Also,
the GetFuture function now provides a more sensible API with the list being
returned instead of accepted as an out parameter.
2012-07-08 15:34:44 -07:00
Strahinja Val Markovic
9a82319c77 Initial version of the ClangComplete class 2012-07-08 11:54:57 -07:00
Strahinja Val Markovic
fb5d25fc81 The cpp file's header should be included first 2012-07-06 14:06:21 -07:00
Strahinja Val Markovic
174687c4bc Renaming ConcurrentStack to ConcurrentLatestValue 2012-07-06 12:14:25 -07:00
Strahinja Val Markovic
8da18e0319 Removing more llvm cruft files 2012-07-05 20:58:10 -07:00
Strahinja Val Markovic
c809d396d1 Removing more unwanted files 2012-07-05 20:31:42 -07:00
Strahinja Val Markovic
3880bd0093 Ignoring some llvm files we don't care about 2012-07-05 20:20:29 -07:00
Strahinja Val Markovic
65ac7dcd7b We DO want clang to be tracked in our in-tree llvm
The llvm gitignore file removes all clang files from revision control. Not what
we want in our case.
2012-07-05 18:24:45 -07:00
Strahinja Val Markovic
6ea344fcbb Removing ds_store files 2012-07-05 18:23:12 -07:00
Strahinja Val Markovic
ac1f40b9af Renaming our gtest targets to gtest_ycm
llvm also has a copy of gtest in its source tree. This causes cmake to bork
since it sees several different targets with the same name (gtest and
gtest_main). So we have to rename our versions of gtest and gtest_main to
something else... We're just appending _ycm now.

This will cause pain when we want to update gtest in the future from upstream,
but I don't see a better way of handling this.
2012-07-05 17:59:32 -07:00
Strahinja Val Markovic
5f4da9324a Adding llvm/clang to our CMakeLists files
The indexer target now depends on libclang. This 
will force cmake to build the required parts of 
llvm and clang.
2012-07-05 17:58:49 -07:00
Strahinja Val Markovic
1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00
Strahinja Val Markovic
8480549b46 Adding llvm and clang in-source 2012-07-05 17:51:06 -07:00
Strahinja Val Markovic
3f96232ce8 Removing second definition of COMPILER_IS_CLANG 2012-07-04 21:50:28 -07:00
Strahinja Val Markovic
570267bbe0 Fixing cmake conf so that we can use all warnings
This includes using a workaround for a CMake bug.
2012-07-04 21:24:16 -07:00
Strahinja Val Markovic
a9eb277da1 Fixing brace style usage 2012-07-04 16:15:41 -07:00
Strahinja Val Markovic
4eb160ac58 Whitespace fix 2012-07-02 11:10:28 -07:00
Strahinja Val Markovic
ee2bfe8952 Fix for query capital chars in wb ratio condition 2012-06-24 18:13:35 -07:00
Strahinja Val Markovic
d18b89bceb Fixed another bug in the word boundary condition
The problem was that should have been using a longest common subsequence
algorithm for the "number of word boundary character matches" calculation. Our
old approach would fail for the following case:

Query: "caafoo"

Candidate1 : "acaaCaaFooGxx"
Candidate2 : "aCaafoog"

Candidate1 needs to win. This is now also a test case.
2012-06-24 17:58:20 -07:00
Strahinja Val Markovic
9b875ca7f3 New sorting rule: char match index sum
The point is that we want to prefer candidates that have the query characters
"earlier" in their text, e.g. "xxabcxxx" over "xxxxxabc" for "abc" query.
2012-06-24 15:35:00 -07:00
Strahinja Val Markovic
adb31abef2 Fixing a bug with word-boundary ratio calculation 2012-06-24 15:11:58 -07:00
Strahinja Val Markovic
5d6e839118 Newly inserted identifiers are added immediately 2012-05-12 15:20:03 -07:00
Strahinja Val Markovic
a8e9b61f3f Going back to 2-4 threads 2012-05-11 10:09:52 -07:00
Strahinja Val Markovic
6e1c7f8429 Optimized the use of threads somewhat 2012-05-10 22:35:08 -07:00
Strahinja Val Markovic
ba76e3f6e6 List instead of vector for storing candidates
This should be faster because appending to a list is O(1), and only amort. O(1)
when appending to a vector.
2012-05-10 21:56:19 -07:00
Strahinja Val Markovic
69c8afb251 Fixing compilation problems on Linux 2012-05-10 10:40:12 -07:00
Strahinja Val Markovic
680a7ce979 Adding the SYSTEM flag for boost and python headers 2012-05-10 09:57:07 -07:00
Strahinja Val Markovic
787b570218 More missing files 2012-05-09 21:59:20 -07:00
Strahinja Val Markovic
41367cf3a7 Adding missing files; gitignore was a bit too trigger-happy 2012-05-09 21:54:25 -07:00
Strahinja Val Markovic
0c0ecc24c4 Using custom collection of Boost libs 2012-05-09 21:45:30 -07:00
Strahinja Val Markovic
d421c43f65 Adding const in a few more places 2012-05-07 22:27:08 -07:00
Strahinja Val Markovic
0110611996 Minimized the test code
Also, modified the Completer interface to facilitate the minimization of the
test code.
2012-05-07 22:10:28 -07:00
Strahinja Val Markovic
5f5b9bd7b4 Adding -Wextra and fixing warnings from it 2012-05-06 00:01:32 -07:00
Strahinja Val Markovic
7cf580a447 Completion suggestions are now fetched async 2012-05-05 23:48:22 -07:00
Strahinja Val Markovic
d9299175aa Removing some commented out code 2012-04-29 19:56:16 -07:00
Strahinja Val Markovic
903452e855 Candidates are now stored per type and filepath 2012-04-29 19:51:20 -07:00
Strahinja Val Markovic
ced1d0ad5a Adding new candidates is now faster; + more
Also fixed a memory leak and started work on adding filepath-aware candidate
repos.
2012-04-29 16:36:31 -07:00
Strahinja Val Markovic
7627f87756 One more test case for RatioUtilizationTieBreak 2012-04-29 13:44:11 -07:00
Strahinja Val Markovic
fedfcb8e44 For "foo" vs "Foo", the all-lowercase one wins 2012-04-16 22:13:05 -07:00
Strahinja Markovic
9019a6f827 Test for query as prefix of candidate preference 2012-04-16 22:00:04 -07:00
Strahinja Markovic
1a08eb9ce0 Updating copyright line 2012-04-15 20:28:46 -07:00
Strahinja Markovic
820e2543b6 Bugfixes and more tests 2012-04-15 20:10:39 -07:00
Strahinja Markovic
86a22c5328 Updating to gmock r405 2012-04-15 17:12:02 -07:00
Strahinja Markovic
156a1882e1 Initial import 2012-04-15 16:57:10 -07:00