Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoother libclang user experience #1

Open
wants to merge 12 commits into
base: smoother_libclang_user_experience
Choose a base branch
from
Open

Smoother libclang user experience #1

wants to merge 12 commits into from

Conversation

cNoNim
Copy link

@cNoNim cNoNim commented Jan 13, 2013

Some Fix :)

By using the clang driver all system include paths are automatically
available and there is no need to recover in any way.
The clang and gcc autoloaders are not necessary any more to optain the
system include paths. Due to the previous commit, the include paths are
now correctly added by the clang driver. libclang always used internally
the clang driver and never had problems finding the system include paths.

We remove these options as incorrectly derived include paths can cause
all kind of spurious problems.

We now print the following message, if someone manually adds 'clang' or
'gcc' to the auto_user_options:

  'gcc' in clang_auto_user_options is deprecated.
Like this we can avoid special cases in the later code path
Instead of passing on the exception, we now provide a proper error
message to the user and fall back to the clang executable.
If libclang is installed in some non-default location, it sometimes
fails to find the path to the builtin includes. This will cause an error
when including these headers which again blocks precompiled header
caching. Even though autocompletion often still works, it is annoyingly
slow.

We now check explicitly if the builtin includes are available. If they
are not we try to find them ourselves. Only if this does not work, we
warn the user and ask him to report a problem.
If the user did not request anything specific, we first try to use
libclang and only fall back to the clang executable if libclang could
not be found. Error messages are only printed in debugging mode or
if the user explicitly requested libclang.

This patch allows us to use libclang.so as soon as it can be found in
the system library path. No further configuration is required in
.vimrc.
Conflicts:
	doc/clang_complete.txt
	plugin/clang_complete.vim
	plugin/libclang.py
…tobig/clang_complete

Conflicts:
	doc/clang_complete.txt
	plugin/clang_complete.vim
	plugin/libclang.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants