diff --git a/auto-complete-clang-async.el b/auto-complete-clang-async.el index c9b059e..755ae64 100644 --- a/auto-complete-clang-async.el +++ b/auto-complete-clang-async.el @@ -266,7 +266,15 @@ set new cflags for ac-clang from shell command output" (push (propertize args 'ac-clang-help ret-f 'raw-args "") candidates) (when (string-match ", \\.\\.\\." args) (setq args (replace-regexp-in-string ", \\.\\.\\." "" args)) - (push (propertize args 'ac-clang-help ret-f 'raw-args "") candidates))))) + (push (propertize args 'ac-clang-help ret-f 'raw-args "") candidates))) + (t + ;; Most likely this is a type with no arguments. We still need to + ;; add something to the candidate list. Otherwise, there is no way + ;; for the user to complete just a C++ class name, because + ;; completion will try to expand to a call to the class's + ;; constructor. + (push s candidates)))) + (cond (candidates (setq candidates (delete-dups candidates)) (setq candidates (nreverse candidates))