[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] "Add Include" does not work
|
In CDT5 (and also in CDT6):
1. Create a simple HelloWorld C project using GNU Linux GCC toolchain.
2. Insert sleep(5); in source after "puts". sleep() is defined in
unistd.h which is not in the current include directive
3. Save file
4. Highlight sleep, right click
5. Select Source > Add include. Observed: include for unistd.h is not
inserted
6. Build project - warning that function sleep is implicitly declared
7. add include for unistd.h by hand, build project - projects build with
no warnings
A debug of the "AddIncludeOnSelectionAction" class shows that when the
symbol name is not already in the indexer, from the code comments - it
will do either a type caching search or a full search (between line 327
and line 333). However neither the type caching search nor the full
search has implementation. They are just empty if-then cases.
How did it work before? Is there a plan to implement both missing searches?
Thanks,
Andy