nobody
c7ef44ad53
Fix hang during reading from stdin
...
I experienced this hang problem when using cquery with
LanguageClient-neovim.
Sometimes std::cout would hang because the pipe is full, which would
normally be fine, since the client would read from the pipe soon.
However, in this case the client is blocking on a write(). This
shouldn't happen, because cquery has a stdin thread which constantly
reads from stdin. But, in C++, cin and cout are tied streams. Reading
from cin would cause cout to flush, which cause the read to block.
So, cquery can't write because the client doesn't read, the client won't
read before it finishes writing. It can't finish writing because cquery
can't read, and cquery can't read because cquery can't write. Which is a
deadlock.
The solution is to simply untie cin and cout.
2017-11-28 13:58:11 -05:00
Fangrui Song
87f6452b5d
Rename clang_args to .cquery
2017-11-27 12:31:54 -05:00
Jacob Dufault
7923b5d219
Revert "Upgrade bundled clang+llvm to 5.0.0, fixes #41 "
...
This reverts commit 162c4e8198bbae2a1ef52b764a365d7b92b8f81e.
2017-11-27 08:40:06 -08:00
Jacob Dufault
d5951c0e69
Revert "Specify nullptr for source_filename in clang_parseTranslationUnit2 so that we do not need to strip main source filename from args"
...
This reverts commit 6adc3a28c39a5f6b58a0a57bfae83916051c19f8.
2017-11-27 08:20:42 -08:00
Fangrui Song
7df44f75a7
Upgrade bundled clang+llvm to 5.0.0, fixes #41
2017-11-27 11:13:32 -05:00
Fangrui Song
2b54296992
Specify nullptr for source_filename in clang_parseTranslationUnit2 so that we do not need to strip main source filename from args
2017-11-27 11:13:07 -05:00
Fangrui Song
bf2aaf470e
Use clang_getCursorKindSpelling
2017-11-27 11:11:21 -05:00
Phil Wise
8ef2be0429
Add note on compilationDatabaseDirectory option
...
This is useful when building with cmake
2017-11-27 10:40:25 -05:00
Josh Elsasser
76785105ed
Add an option to disable EmitProgress methods during indexing
2017-11-26 19:50:57 -05:00
Jacob Dufault
d1692c8deb
Add link to wiki on README
2017-11-26 12:28:41 -08:00
Fangrui Song
8aaffb7031
Set rpath if not --use_system_clang
2017-11-26 15:15:05 -05:00
xbreak
972a6359da
Added waf options to use clang from system ( fixes #36 ): ( #64 )
...
- `--use-system-clang` enables use of system clang.
- `--llvm-config=LLVM_CONFIG` specifies which llvm-config to use.
- `--clang-prefix=CLANG_PREFIX` specifies the clang prefix to use as
a fallback if llvm-config is not available.
2017-11-26 12:13:43 -05:00
Peter Elmers
750cc4ea30
Respond to comment
2017-11-26 12:12:59 -05:00
Peter Elmers
3341b1f13d
Only replace text if both rangeLength and range are not set
2017-11-26 12:12:59 -05:00
Walter Erquinigo
31d7423490
Rebuild vscode plugin and fix some naming
2017-11-26 12:11:09 -05:00
Walter Erquinigo
3cee3cb775
Support an optional compilation database dir at initialization
2017-11-26 12:11:09 -05:00
Peter Elmers
6f6cd4ea7f
Give default value to compileCommandsDirectory
2017-11-26 12:11:09 -05:00
Peter Elmers
b7059e69d7
Add compileCommandsDirectory to config struct
2017-11-26 12:11:09 -05:00
Fangrui Song
dba27c3d34
Catch ios_base::failure exceptions in ReadContent
...
`filename` may be a directory (the latest Emacs lsp-mode sometimes sends a `textDocument/didOpen` message with an empty filename) or the file cannot be read.
2017-11-22 11:35:46 -05:00
Fangrui Song
7d06ff212f
Use -Wno-sign-compare to make recent GCC happy
2017-11-22 10:42:04 -05:00
DaanDeMeyer
030e63f15c
Remove whitespace before shebang in wscript
...
This makes the python extension in vscode recognize it as a python file
2017-11-20 17:14:24 -05:00
Jacob Dufault
626f7bc736
Use compile_commands.json in root directory in favor of clang_args
2017-11-19 18:52:09 -08:00
Jacob Dufault
6a23c5bace
Enable path in args test
2017-11-19 15:46:02 -08:00
Fangrui Song
fb38537f20
Strip main source filename if it is a relative path in GetCompilationEntryFromCompileCommandEntry
2017-11-19 18:30:27 -05:00
Daan De Meyer
de1de3e51a
Remove .vscode directories from the repository and add .vscode
...
to the .gitignore
2017-11-19 18:09:32 -05:00
Jacob Dufault
261b04a131
Update test once more
2017-11-19 14:48:26 -08:00
Jacob Dufault
475cd6b668
Add failing test for issue #42
2017-11-19 14:46:05 -08:00
Jacob Dufault
5f73c7efac
Allow running unit and index tests separately
2017-11-19 14:35:16 -08:00
Jacob Dufault
97417ecc93
Reformat code
2017-11-19 14:11:54 -08:00
Fangrui Song
297ed1d13e
Use indented TEST_SUITE
2017-11-19 14:13:11 -05:00
Daan De Meyer
424c7b69db
Fix wscript to support both Python 2 and Python 3.
2017-11-19 13:03:40 -05:00
Daniel Martín
e3a7be1cfe
Add project .clang-format
2017-11-19 12:15:14 -05:00
Daan De Meyer
5842dd5d60
Add option to disable insertion of snippets when completing a method/function call.
2017-11-19 10:30:29 -05:00
agauniyal
0a3064fe34
Add travis config, fixes #31
2017-11-19 10:25:23 -05:00
Fangrui Song
49559402cf
Add a virtual destructor for ThreadedQueue
2017-11-19 01:16:32 -05:00
Peter Goodman
3f45c05476
This commit fixes severak compiler errors when trying to build cquery. I gave up after a bit and didn't fix them all though, there are a ton of signed to unsigned comparisons.
2017-11-18 16:09:14 -05:00
Jacob Dufault
0376da015f
Try to always log when exiting.
2017-11-18 11:02:09 -08:00
Jacob Dufault
6a50c48aaa
Formatting and a TODO
2017-11-18 09:29:48 -08:00
Jacob Dufault
eea8a1b07a
Try to avoid crashing when deserializing JSON
2017-11-18 09:27:37 -08:00
Jacob Dufault
544818bdd4
waf: Only compile cc files in src/
2017-11-18 09:27:09 -08:00
Jacob Dufault
7b0d2d7bf2
Make sure to send initialize response before status updates
2017-11-17 13:31:48 -08:00
Jacob Dufault
2ebf27441b
Mention C in README
2017-11-17 09:57:46 -08:00
Jacob Dufault
75774e24bf
Update README
2017-11-17 07:52:30 -08:00
Abhinav Gauniyal
27a00d7ad3
Update command_line.cc, fixes #14
...
- error: lambda capture 'working_files' is not used
- error: lambda capture 'config' is not used
2017-11-17 07:35:15 -08:00
Christian Pehle
c7c6a8ed39
Fix build on macOS #20
2017-11-17 07:34:09 -08:00
Jacob Dufault
42f744ba29
Remove some unused code.
2017-11-11 11:43:55 -08:00
Jacob Dufault
601af73ca9
Move all libclangmm/* files into src/* directory
2017-11-11 11:41:09 -08:00
Jacob Dufault
348b4a2e4e
Move libclangmm/Cursor.* to clang_cursor.*
2017-11-11 11:31:05 -08:00
Jacob Dufault
5fa7fbf0d2
More improvements to semantic highlighting. Still not done though.
2017-11-11 11:18:55 -08:00
Jacob Dufault
8145a06534
First pass at semantic highlighting.
...
It is disabled by default.
2017-11-08 23:06:32 -08:00