Community
Participate
Working Groups
Created attachment 122751 [details] confusion in the includes grouping Build ID: HEAD Steps To Reproduce: As described in bug252966 comment 15 The Includes as shown in the attached image was achieved using HEAD CDT.
Repeating the steps from bug252966 comment 15: created cygwin executable project Hello. Then created 2 folders Hello/src/IncD/ and Hello/src/IncR/. Added in Properties/Paths-and-Symbols IncD/ to Debug configuration GNU C++ language and IncR/ to Release configuration GNU C++ language. Expanded "Includes". Built Release configuration. Now there are weird things under Includes appearing. I see Hello.cpp there. IncD/ appears twice and IncR/ (which is empty in reality) keeps C++ std headers such as limits.h and stddef.h. It was not that weird when I tested from the HEAD and I tried a few times. Autobuild was enabled in both cases. I can reproduce, but in my case the wrong includes are almost instantly replaced by the correct ones. I am pretty sure this is a UI problem only (wrong labels are displayed) A potential culprit could be IncludeReferenceProxy which implements equals() in a non-reflexive way.
Created attachment 122788 [details] Fix IncludeReferenceProxy equals and hashCode Could you try this patch if it has some effect?
Created attachment 122829 [details] I see a slightly different picture when trying in Debug mode from the HEAD. Interesting that I do not observe the problem when running in not Debud but in Run. I wasted some time trying to repeat the problem from HEAD and could do so only running CDT from debugger. This may account for some confusion in bug 252966. After that I applied the patch and tried to repeat the test case in Debug mode click-by-click. It looks like I upgraded to the situation described by Tony. I can see the same faulty tree label (see attached image) momentarily and then it is changed by the proper one.
FYI, I have committed the fix to IncludeReferenceProxy, but I am leaving this bug open for now.
*** Bug 267044 has been marked as a duplicate of this bug. ***
(In reply to comment #4) > FYI, I have committed the fix to IncludeReferenceProxy, but I am leaving this > bug open for now. I've backported this fix to the 5.0 stream.