]> code.delx.au - gnu-emacs-elpa/blobdiff - company-clang.el
company-clang--annotation: include method qualifiers in the annotation
[gnu-emacs-elpa] / company-clang.el
index a53a29675471edc635dc5e522d1755316587ea35..cc7660c345314603b80e511ef22f88c3ffdfa778 100644 (file)
@@ -147,7 +147,7 @@ or automatically through a custom `company-clang-prefix-guesser'."
      ((null meta) nil)
      ((string-match "[^:]:[^:]" meta)
       (substring meta (1+ (match-beginning 0))))
-     ((string-match "\\((.*)\\'\\)" meta)
+     ((string-match "\\((.*)[ a-z]*\\'\\)" meta)
       (match-string 1 meta)))))
 
 (defun company-clang--strip-formatting (text)
@@ -217,14 +217,14 @@ or automatically through a custom `company-clang-prefix-guesser'."
                   t))))))
 
 (defsubst company-clang--build-complete-args (pos)
-  (append '("-cc1" "-fsyntax-only" "-code-completion-macros")
+  (append '("-fsyntax-only" "-Xclang" "-code-completion-macros")
           (unless (company-clang--auto-save-p)
             (list "-x" (company-clang--lang-option)))
           company-clang-arguments
           (when (stringp company-clang--prefix)
             (list "-include" (expand-file-name company-clang--prefix)))
-          '("-code-completion-at")
-          (list (company-clang--build-location pos))
+          (list "-Xclang" (format "-code-completion-at=%s"
+                                  (company-clang--build-location pos)))
           (list (if (company-clang--auto-save-p) buffer-file-name "-"))))
 
 (defun company-clang--candidates (prefix callback)