clang_complete icon indicating copy to clipboard operation
clang_complete copied to clipboard

clang_complete does not work on std::vector

Open EzoeRyou opened this issue 11 years ago • 2 comments

My environment is Ubuntu 13.10 with Clang 3.4(comes from Ubuntu repository) with libc++.

let g:clang_library_path = '/usr/lib/llvm-3.4/lib' let g:clang_user_options = '-std=c++11 -stdlib=libc++'

Somehow, clang_complete doens't work only on std::vector. When I remove/add #include vector it briefly works for a few minutes then stop working only for std::vector.

EzoeRyou avatar Dec 12 '13 13:12 EzoeRyou

By "doesn't work", I mean, clang_complete does not complete vector from std namespace:

std:: // doesn't work for std::vector

It can complete member of the variable that type is a specialization of std::vector template. std::vector<int> v ; v. // this works

EzoeRyou avatar Dec 12 '13 13:12 EzoeRyou

This completion works for me. """ #include

int foo() { std::
} """

What exactly is the file you are trying to complete?

Can you set g:clang_debug=1, do a completion and then type ":mess" into vim. This should show output similar to:

libclang code completion: Command: clang -I/home/grosser/Projects/polly/git/tools/polly/include/ -I/home/grosser/Projects/polly/buil d/tools/polly/include/ -I/home/grosser/Projects/polly/build/include/ -x c++ -fsyntax-only -Xclang -code-c ompletion-at=/tmp/test.cpp:5:6 /tmp/test.cpp cwd: None File: /tmp/test.cpp Line: 5, Column: 6

Can you run the above command on the console and see if it gives any error messages?

tobiasgrosser avatar Mar 06 '14 11:03 tobiasgrosser