Community
Participate
Working Groups
Build Identifier: I20100608-0911 This bug is related to Bug 318130 but this addresses the problem of the indexer. I'm using CDT 7.0. It seems that the indexer has problems with some constructs that can be (for instance) found in the boost filesystem API. The basic text example looks as: #include <boost/filesystem.hpp> namespace fs = ::boost::filesystem; int main(void) { fs::directory_iterator itr("/home/sba"); itr->status(); return 0; } Reproducible: Always Steps to Reproduce: 1. Create a new C++ project 2. Add the file given above (test.c). 3. Try to enter itr-> somewhere in main and press CTRL+Space (to bring up the content assist) 4. Observe that no suggestions are made. 5. Go to shell and run GCCs preprocessor on the file, e.g., "gcc test.c -E >test2.c" 6. Refresh the project to see the new file test2.c in the project. 7. Rebuild the index of the project 8. Go to the bottom of the file and observe that the content assist shows suggestions. Interestingly, the same works now also for the original test.c file. It seems that something that is normally not emitted by the GCC preprocessor disturbes the CDT indexer, or the indexer has some problems with including files.
What is the problem you are observing?
At the state of point 4, the content assist doesn't provide any completion suggestions for the itr-> contruct. Other components such as the refactoring don't seem to work if that information is not available (see Bug 318130). That it does provide completion suggestions at the state of point 8 is an additional observation, which could help to track down the problem.
I can reproduce the problem. Root cause seems to be the pattern: // header a.h and b.h #include <boost/type_traits/detail/bool_trait_def.hpp> .... #include <boost/type_traits/detail/bool_trait_undef.hpp> // source a.cpp #include "a.h" #include "b.h" // we don't look at bool_trait_def.hpp and miss some macros
This works for me with the latest Juno build. I think the fix to Bug 197989 is what fixed it.
(In reply to comment #4) > This works for me with the latest Juno build. I think the fix to Bug 197989 is > what fixed it. Thanks, you are right.
*** Bug 372598 has been marked as a duplicate of this bug. ***