{"action":"opened","issue":{"url":"https://api.github.com/repos/Sarcasm/irony-mode/issues/345","repository_url":"https://api.github.com/repos/Sarcasm/irony-mode","labels_url":"https://api.github.com/repos/Sarcasm/irony-mode/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/Sarcasm/irony-mode/issues/345/comments","events_url":"https://api.github.com/repos/Sarcasm/irony-mode/issues/345/events","html_url":"https://github.com/Sarcasm/irony-mode/issues/345","id":189429716,"number":345,"title":"Auto-completion not working for C++ std library","user":{"login":"junkudo","id":1308006,"avatar_url":"https://avatars.githubusercontent.com/u/1308006?v=3","gravatar_id":"","url":"https://api.github.com/users/junkudo","html_url":"https://github.com/junkudo","followers_url":"https://api.github.com/users/junkudo/followers","following_url":"https://api.github.com/users/junkudo/following{/other_user}","gists_url":"https://api.github.com/users/junkudo/gists{/gist_id}","starred_url":"https://api.github.com/users/junkudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junkudo/subscriptions","organizations_url":"https://api.github.com/users/junkudo/orgs","repos_url":"https://api.github.com/users/junkudo/repos","events_url":"https://api.github.com/users/junkudo/events{/privacy}","received_events_url":"https://api.github.com/users/junkudo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-15T15:54:47Z","updated_at":"2016-11-15T15:54:47Z","closed_at":null,"body":"I just want to begin by saying thanks for the program!  I've been really enjoying it for my personal use.  That being said, I've been trying to set-up the same configuration for my work system and I'm having some trouble getting it to properly work.  Currently, the auto-completion doesn't seem to be fully functioning with the C++ standard library; I'm unable to properly complete function calls on a `std::vector<double>` object (but it sometimes(?) works for a `std::vector<int>)`.  I'm currently using a .json compilation database created from our cmake build system.\r\n\r\nHere's my .emacs file for reference:\r\n```\r\n\r\n;;----------------------- IRONY -------------------------------------                                                                                                                                                                                                                                                        \r\n;; irony mode is emacs minor mode that aims to improve editing exp                                                                                                                                                                                                                                                           \r\n(add-to-list 'load-path \"~/.emacs.d/irony/\")\r\n(load \"irony\")\r\n(load \"irony-cdb\")\r\n(add-hook 'c++-mode-hook 'irony-mode)\r\n(add-hook 'c-mode-hook 'irony-mode)\r\n(add-hook 'objc-mode-hook 'irony-mode)\r\n\r\n;; replace the `completion-at-point' and `complete-symbol' bindings in                                                                                                                                                                                                                                                       \r\n;; irony-mode's buffers by irony-mode's function                                                                                                                                                                                                                                                                             \r\n(defun my-irony-mode-hook ()\r\n  (define-key irony-mode-map [remap completion-at-point]\r\n    'irony-completion-at-point-async)\r\n  (define-key irony-mode-map [remap complete-symbol]\r\n    'irony-completion-at-point-async))\r\n(add-hook 'irony-mode-hook 'my-irony-mode-hook)\r\n\r\n;; ;; Clang options                                                                                                                                                                                                                                                                                                          \r\n(setq irony-additional-clang-options (quote (\"-std=c++11\")))\r\n\r\n;; this will read from the project's root .json or clang_complete                                                                                                                                                                                                                                                            \r\n(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)\r\n\r\n(defun setup-cpp-clang-options()\r\n  (setq irony-addiional-clang-options (quote (\"-std=c++14\" \"-stdlib=libc++\"))))\r\n(add-hook 'c++-mode-hook 'setup-cpp-clang-options)\r\n\r\n;;----------------------- COMPANY ------------------------------------                                                                                                                                                                                                                                                       \r\n;; text completion framework for emacs                                                                                                                                                                                                                                                                                       \r\n(add-to-list 'load-path \"~/.emacs.d/company-mode/\")\r\n(load \"company\")\r\n(add-hook 'after-init-hook 'global-company-mode)\r\n(add-hook 'c++-mode-hook 'company-mode)\r\n(add-hook 'c-mode-hook 'company-mode)\r\n(eval-after-load 'company\r\n'(add-to-list 'company-backends 'company-irony))\r\n\r\n;;----------------------- COMPANY IRONY ------------------------------------                                                                                                                                                                                                                                                 \r\n;; connection between company and irony                                                                                                                                                                                                                                                                                      \r\n(add-to-list 'load-path \"~/.emacs.d/company-irony/\")\r\n(load \"company-irony\")\r\n(eval-after-load 'company\r\n  '(add-to-list 'company-backends 'company-irony))\r\n;; (optional) adds CC special commands to `company-begin-commands' in order to                                                                                                                                                                                                                                               \r\n;; trigger completion at interesting places, such as after scope operator                                                                                                                                                                                                                                                    \r\n;;     std::|                                                                                                                                                                                                                                                                                                                \r\n(add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)\r\n\r\n;; ==========================================                                                                                                                                                                                                                                                                                \r\n;; (optional) bind TAB for indent-or-complete                                                                                                                                                                                                                                                                                \r\n;; ==========================================                                                                                                                                                                                                                                                                                \r\n(defun irony--check-expansion ()\r\n(save-excursion\r\n  (if (looking-at \"\\\\_>\") t\r\n    (backward-char 1)\r\n    (if (looking-at \"\\\\.\") t\r\n      (backward-char 1)\r\n      (if (looking-at \"->\") t nil)))))\r\n(defun irony--indent-or-complete ()\r\n\"Indent or Complete\"\r\n(interactive)\r\n(cond ((and (not (use-region-p))\r\n            (irony--check-expansion))\r\n       (message \"complete\")\r\n       (company-complete-common))\r\n      (t\r\n       (message \"indent\")\r\n       (call-interactively 'c-indent-line-or-region))))\r\n(defun irony-mode-keys ()\r\n\"Modify keymaps used by `irony-mode'.\"\r\n(local-set-key (kbd \"TAB\") 'irony--indent-or-complete)\r\n(local-set-key [tab] 'irony--indent-or-complete))\r\n(add-hook 'c-mode-common-hook 'irony-mode-keys)\r\n\r\n```\r\n\r\nI suspect it's a problem with the irony-server installation.  I got a brief warning (replicated below) when I was installing the server.  Could this be the issue?\r\n```\r\n-*- mode: compilation; default-directory: \"/tmp/build-irony-server-0.2.0/\" -*-\r\nCompilation started at Tue Nov 15 09:27:55\r\n\r\ncmake -DCMAKE_INSTALL_PREFIX\\=/home/kudojx/.emacs.d/irony/ /home/kudojx/.emacs.d/irony/server && cmake --build . --use-stderr --config Release --target install\r\n-- Detecting libclang builtin headers directory\r\n-- Detecting libclang builtin headers directory -- fail\r\nCMake Warning at cmake/CheckLibClangBuiltinHeadersDir.cmake:87 (message):\r\n  CheckLibClangBuiltinHeadersDir: unsupported configuration, please report.\r\n\r\n\r\n\r\n    Check with args: -isystem;\"/usr/lib/clang/3.4.2/include\";/tmp/build-irony-server-0.2.0/CMakeFiles/CMakeTmp/check-libclang-stddef.cpp\r\n    Check output:\r\n\r\n\r\nCall Stack (most recent call first):\r\n  src/CMakeLists.txt:8 (check_libclang_builtin_headers_dir)\r\n\r\n\r\n-- Irony package version is '0.2.0'\r\n-- Found emacs: /usr/bin/emacs\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /tmp/build-irony-server-0.2.0\r\n[100%] Built target irony-server\r\nInstall the project...\r\n-- Install configuration: \"Release\"\r\n-- Up-to-date: /home/kudojx/.emacs.d/irony/bin/irony-server\r\n\r\nCompilation finished at Tue Nov 15 09:27:55\r\n\r\n```\r\nLet me know if there's anything obviously wrong with what I'm doing!\r\n"}}
{"actor":{"display_login":"junkudo"}}