ncm2 / ncm2-pyclang

Cached, fast C/C++ completion for ncm2
MIT License
45 stars 1 forks source link

Variable members are not displayed when using clangd 6 #10

Open balta2ar opened 6 years ago

balta2ar commented 6 years ago

Hi, I was surprised to find out that there is no completion for variable when running with clangd 6.0.1. On my work machine I have clangd 5.0.2 (ubuntu 16) and completion for a variable is displayed. At home, on ArchLinux, it's not.

LLVM (http://llvm.org/):
  LLVM version 6.0.1
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: sandybridge
let g:ncm2_pyclang#library_path = '/usr/lib/libclang.so.6.0'

Sample program:

#include <vector>
using namespace std;
int main() {
    vector<int> items;
    items.
    return 0;
}

no completion is displayed after items. On the other hand, completion for std:: is working fine.

lyu commented 6 years ago

I am also having this issue: LLVM 5.0.2 works for both C and C++, while LLVM 6.0.1 can't give proper C++ completions. It is actually worse in my case, most of the stuff from std:: won't show up (for iostream, only std::endl shows up, I cannot get cout/cerr etc.).

This probably isn't a bug in LLVM 6.0.1 because the old ncm works fine with it.

Edit: LLVM 7.0.0 RC3 also doesn't work with ncm2-pyclang, for C++ completions.

fcying commented 6 years ago

I test it in debian testing with clang+llvm-5.0.2-x86_64-linux-gnu-ubuntu-16.04, it can't complte items. also.

ObserverOfTime commented 5 years ago

I'm in a similar situation as @lyu. No completion for variable methods, and no completion for some std:: identifiers (cout & cerr show up but others like regex don't). I'm using LLVM 7.0.0-1 on Antergos x86_64.

I've switched to DroZ-hun/clang_complete for now, where all completions work (except for headers).

ObserverOfTime commented 4 years ago

All completions seem to be working now on 9.0.0.