{"action":"created","issue":{"url":"https://api.github.com/repos/MaskRay/ccls/issues/37","repository_url":"https://api.github.com/repos/MaskRay/ccls","labels_url":"https://api.github.com/repos/MaskRay/ccls/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/MaskRay/ccls/issues/37/comments","events_url":"https://api.github.com/repos/MaskRay/ccls/issues/37/events","html_url":"https://github.com/MaskRay/ccls/issues/37","id":345115243,"node_id":"MDU6SXNzdWUzNDUxMTUyNDM=","number":37,"title":"cannot find system C++ header with ccls","user":{"login":"FirstLoveLife","id":37442588,"node_id":"MDQ6VXNlcjM3NDQyNTg4","avatar_url":"https://avatars3.githubusercontent.com/u/37442588?v=4","gravatar_id":"","url":"https://api.github.com/users/FirstLoveLife","html_url":"https://github.com/FirstLoveLife","followers_url":"https://api.github.com/users/FirstLoveLife/followers","following_url":"https://api.github.com/users/FirstLoveLife/following{/other_user}","gists_url":"https://api.github.com/users/FirstLoveLife/gists{/gist_id}","starred_url":"https://api.github.com/users/FirstLoveLife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirstLoveLife/subscriptions","organizations_url":"https://api.github.com/users/FirstLoveLife/orgs","repos_url":"https://api.github.com/users/FirstLoveLife/repos","events_url":"https://api.github.com/users/FirstLoveLife/events{/privacy}","received_events_url":"https://api.github.com/users/FirstLoveLife/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-27T07:10:02Z","updated_at":"2018-07-28T01:40:51Z","closed_at":null,"author_association":"NONE","body":"![image](https://user-images.githubusercontent.com/37442588/43304165-9a64254c-91a5-11e8-889c-0e47d10ba414.png)\r\nsystem C header and Clang resource directory both complete fine:\r\n![image](https://user-images.githubusercontent.com/37442588/43304206-c737f2d8-91a5-11e8-8b39-5e1aa7ded75d.png)\r\n![image](https://user-images.githubusercontent.com/37442588/43304221-d94c09dc-91a5-11e8-8af2-2dd11ac05fb4.png)\r\n\r\n**Once I change all `ccls` in my configuration into `cquery`, C++ header can be also completed fine.** So I think the problem arises from  `ccls`\r\n\r\nI have noticed [this FAQ](https://github.com/MaskRay/ccls/wiki/FAQ#some-cc-headers-are-not-recognized):\r\n>  Set Initialization options \"cacheFormat\": \"json\" and run jq . < /tmp/ccls/@tmp@c/a.cc.json to see if -resource-dir is correct, \r\n\r\nIIRC, `(setq ccls-cache-dir \".ccls_cached_index\")` store the cache. Then I found in root of project(just 1 source file for test, but has cmake and compile_commands.json and cquery do work fine in this project) a `.ccls_cached_index` folder. There is two folder inseder, `@@...` and `@...`. In `@@...`, there is no json file, opposite filled with: \r\n```\r\n...\r\n@usr@include@c++@8.1.1@bits@predefined_ops.h.blob         @usr@include@wctype.h\r\n@usr@include@c++@8.1.1@bits@ptr_traits.h                  @usr@include@wctype.h.blob\r\n...\r\n```\r\n\r\nHowever in `.cquery_cached_index/@@...` folder, there are json files:\r\n```\r\n...\r\n@usr@include@c++@8.1.1@bits@predefined_ops.h              @usr@lib@gcc@x86_64-pc-linux-gnu@8.1.1@include@stdarg.h\r\n@usr@include@c++@8.1.1@bits@predefined_ops.h.json         @usr@lib@gcc@x86_64-pc-linux-gnu@8.1.1@include@stdarg.h.json\r\n```\r\n\r\nI don't if here is wrong. \r\n\r\n\r\nFrom [this link](https://emacs-china.org/t/topic/5428/38?u=firstlove), I tried it on os:\r\n```\r\n@chenli-pc ➜ @@home@chenli@Dropbox@Demo@Graph@  clang++ -v -xc++ -E /dev/null    \r\nclang version 6.0.0 (tags/RELEASE_600/final)\r\nTarget: x86_64-pc-linux-gnu\r\nThread model: posix\r\nInstalledDir: /bin\r\nFound candidate GCC installation: /bin/../lib/gcc/x86_64-pc-linux-gnu/8.1.1\r\nFound candidate GCC installation: /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1\r\nFound candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1\r\nFound candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/8.1.1\r\nSelected GCC installation: /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1\r\nCandidate multilib: .;@m64\r\nCandidate multilib: 32;@m32\r\nSelected multilib: .;@m64\r\n \"/usr/bin/clang-6.0\" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name null -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/clang/6.0.0 -internal-isystem /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1 -internal-isystem /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1/x86_64-pc-linux-gnu -internal-isystem /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib/clang/6.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/chenli/Dropbox/Demo/Graph/.ccls-cache/@@home@chenli@Dropbox@Demo@Graph@ -ferror-limit 19 -fmessage-length 167 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ /dev/null\r\nclang -cc1 version 6.0.0 based upon LLVM 6.0.0 default target x86_64-pc-linux-gnu\r\nignoring nonexistent directory \"/include\"\r\n#include \"...\" search starts here:\r\n#include <...> search starts here:\r\n /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1\r\n /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1/x86_64-pc-linux-gnu\r\n /bin/../lib64/gcc/x86_64-pc-linux-gnu/8.1.1/../../../../include/c++/8.1.1/backward\r\n /usr/local/include\r\n /usr/lib/clang/6.0.0/include\r\n /usr/include\r\nEnd of search list.\r\n# 1 \"/dev/null\"\r\n# 1 \"<built-in>\" 1\r\n# 1 \"<built-in>\" 3\r\n# 394 \"<built-in>\" 3\r\n# 1 \"<command line>\" 1\r\n# 1 \"<built-in>\" 2\r\n# 1 \"/dev/null\" 2\r\n```\r\nAny problem below?\r\n\r\nI really want to become `ccls` user but this problem quite confuse me. Hope you can help me. Here is my configuration: \r\n\r\n```\r\n(setq ccls-executable \"~/Downloads/ccls/Release/ccls\")\r\n(setq ccls-extra-args '(\"--log-file=/tmp/cq.log\"))\r\n(defun ccls//enable ()\r\n   (condition-case nil\r\n\t(lsp-ccls-enable)\r\n        (user-error nil)))\r\n(add-hook 'c++-mode-hook #'ccls//enable)\r\n\r\n(setq ccls-cache-dir \".ccls_cached_index\")\r\n\r\n(use-package ccls\r\n   :requires (lsp-ui-flycheck lsp-ui-sideline)\r\n   :ensure t\r\n   :custom\r\n   (company-lsp-async t)\r\n   (ccls-extra-init-params '(:completion (:detailedLabel t)))\r\n   (company-lsp-cache-candidates nil)\r\n   (company-transformers nil)\r\n   :config\r\n   (setq ccls-sem-highlight-method 'font-lock)\r\n   :after (company company-lsp)\r\n   :commands (lsp-ccls-enable c++-mode))\r\n```"},"comment":{"url":"https://api.github.com/repos/MaskRay/ccls/issues/comments/408573962","html_url":"https://github.com/MaskRay/ccls/issues/37#issuecomment-408573962","issue_url":"https://api.github.com/repos/MaskRay/ccls/issues/37","id":408573962,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODU3Mzk2Mg==","user":{"login":"FirstLoveLife","id":37442588,"node_id":"MDQ6VXNlcjM3NDQyNTg4","avatar_url":"https://avatars3.githubusercontent.com/u/37442588?v=4","gravatar_id":"","url":"https://api.github.com/users/FirstLoveLife","html_url":"https://github.com/FirstLoveLife","followers_url":"https://api.github.com/users/FirstLoveLife/followers","following_url":"https://api.github.com/users/FirstLoveLife/following{/other_user}","gists_url":"https://api.github.com/users/FirstLoveLife/gists{/gist_id}","starred_url":"https://api.github.com/users/FirstLoveLife/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirstLoveLife/subscriptions","organizations_url":"https://api.github.com/users/FirstLoveLife/orgs","repos_url":"https://api.github.com/users/FirstLoveLife/repos","events_url":"https://api.github.com/users/FirstLoveLife/events{/privacy}","received_events_url":"https://api.github.com/users/FirstLoveLife/received_events","type":"User","site_admin":false},"created_at":"2018-07-28T01:40:51Z","updated_at":"2018-07-28T01:40:51Z","author_association":"NONE","body":"Thanks. I also want to build llvm7.0 now. \r\n\r\nBy the way, now that you prefer c++17 here, maybe you can replace `#ifdef` blocks with `if constexpr`?"}}
{"actor":{"display_login":"FirstLoveLife"}}