[cfe-dev] Autocomplete not working for Header inclusions.

Kevin Funk kfunk at kde.org
Fri Dec 5 03:21:31 PST 2014


On Friday 05 December 2014 03:00:52 pragya wrote:
> When we trigger clang_codeCompleteAt after typing "#include <" , we do not
> get any auto complete result.
> We would like to know if Clang provides auto complete suggestion for header
> include paths. If yes then please let us know how to get the result.

It doesn't give you suggestion for includes. But actually I'm wondering it's 
not feasible to let it do that. At that point clang is already aware of all 
include paths involved, so it could as well give you suggestions based on the 
files contained in the include paths. (But keep in mind this can be expensive, 
since you'll have to list the files in each include path).

Maybe some of the more experienced Clang developers can comment on that?

For what it's worth: We implemented our own solution for doing this in 
KDevelop. See [1] for some inspiration.

Greets

[1] http://quickgit.kde.org/?p=kdev-clang.git&a=blob&h=24fc271480e020006ede518145bb451eb9838500&hb=9edbc8abc8976efc35b8496d30614f975112f1c9&f=codecompletion%2Fincludepathcompletioncontext.cpp

> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Autocomplete-not-working-for-He
> ader-inclusions-tp4042744.html Sent from the Clang Developers mailing list
> archive at Nabble.com. _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org



More information about the cfe-dev mailing list