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

ccls doesn't see definitions in headers #14

Open
mdaum-adsk opened this issue Feb 25, 2019 · 7 comments
Open

ccls doesn't see definitions in headers #14

mdaum-adsk opened this issue Feb 25, 2019 · 7 comments

Comments

@mdaum-adsk
Copy link

mdaum-adsk commented Feb 25, 2019

#include <string>
std::string s{};

In emacs flycheck I get the error "ccls: no type named 'string' in namespace std". Same with types defined in <cstdint>.

@mdaum-adsk
Copy link
Author

Hmm. Actually seems to be any header at all.

@mdaum-adsk mdaum-adsk changed the title ccls doesn't see definitions in system headers ccls doesn't see definitions in headers Feb 25, 2019
@coobeeyon
Copy link

This poodle exhibits both behaviours. And shows the compile commands in play.

cmakepoodle.zip

@twlz0ne
Copy link
Owner

twlz0ne commented Feb 26, 2019

@mdaum-adsk @coobeeyon
You should go https://github.com/MaskRay/ccls for help.

@coobeeyon
Copy link

This is the resource dir line from the log file:

09:09:42 initialize.cc:328 I use -resource-dir=/usr/local/Cellar/llvm/7.0.1/lib/clang/7.0.1

And that clang doesn't seem to have the C++ headers there.

@coobeeyon
Copy link

Turns out the system headers are a separate problem from the local headers. Local header problem I have managed to fix on the CCLS side.

@twlz0ne
Copy link
Owner

twlz0ne commented Mar 6, 2019

In emacs flycheck I get the error "ccls: no type named 'string' in namespace std". Same with types defined in <cstdint>.

@mdaum-adsk flycheck is noisy, now lsp have used flymake (emacs-lsp/lsp-mode@47f30a1) instead.

09:09:42 initialize.cc:328 I use -resource-dir=/usr/local/Cellar/llvm/7.0.1/lib/clang/7.0.1
And that clang doesn't seem to have the C++ headers there.

@coobeeyon I suggest you goto to https://github.com/MaskRay/ccls for help.

@findNextStep
Copy link

try launch ccls with -init='{"clang":{"extraArgs":["-isystem", "/Library/Developer/CommandLineTools/usr/include/c++/v1"]}}'
that wrok for me
see : MaskRay/ccls#191 (comment)

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

No branches or pull requests

4 participants