Skip to content

Commit

Permalink
Remove obsolete clang_complete option and pull in attempt to fix xavi…
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Mar 16, 2013
1 parent 565f70a commit 645802c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions bundle/clang_complete/plugin/clang/cindex.py
Expand Up @@ -1634,7 +1634,8 @@ class ClangObject(object):
the ctypes library and the Clang CIndex library.
"""
def __init__(self, obj):
assert isinstance(obj, c_object_p) and obj
assert obj
assert isinstance(obj, c_object_p)
self.obj = self._as_parameter_ = obj

def from_param(self):
Expand Down Expand Up @@ -1838,7 +1839,8 @@ def __getitem__(self, key):

class CodeCompletionResults(ClangObject):
def __init__(self, ptr):
assert isinstance(ptr, POINTER(CCRStructure)) and ptr
assert ptr
assert isinstance(ptr, POINTER(CCRStructure))
self.ptr = self._as_parameter_ = ptr

def from_param(self):
Expand Down Expand Up @@ -2015,7 +2017,7 @@ def from_source(cls, filename, args=None, unsaved_files=None, options=0,
len(args), unsaved_array,
len(unsaved_files), options)

if ptr is None:
if not ptr:
raise TranslationUnitLoadError("Error parsing translation unit.")

return cls(ptr, index=index)
Expand All @@ -2037,7 +2039,7 @@ def from_ast_file(cls, filename, index=None):
index = Index.create()

ptr = conf.lib.clang_createTranslationUnit(index, filename)
if ptr is None:
if not ptr:
raise TranslationUnitLoadError(filename)

return cls(ptr=ptr, index=index)
Expand Down
1 change: 0 additions & 1 deletion vimrc
Expand Up @@ -105,7 +105,6 @@ let g:clang_snippets=1
let g:clang_snippets_engine="ultisnips"
"let g:clang_conceal_snippets=1
let g:clang_use_library=1
let g:clang_exec="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
let g:clang_library_path="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib"
"let g:clang_user_options=""
let g:clang_auto_user_options="compile_commands.json, path, .clang_complete"
Expand Down

0 comments on commit 645802c

Please sign in to comment.