Community
Participate
Working Groups
Build Identifier: I20110613-1736 In the following code example, ctrl+click does not work on "+" (code line 12 in main.cpp). ctrl+clicking on operator "-" (which is not overloaded in struct "inter") works fine. As far as I figured out, all of the following conditions must be met to have the error occur: * member-function doSomething() must be inside of struct "sub" * struct "base" must be in a header file * type of "left" and "right" must be "base" Reproducible: Always Steps to Reproduce: code: //main.cpp #include"base.h" struct inter : public base { virtual void operator+(base const &){} }; struct sub : public inter { void doSomething() { base *left, *right; *left + *right; *left - *right; } }; //base.h struct base { virtual void operator+(base const &) { } virtual void operator-(base const &) { } };
Thanks for the example, added testcase and fix.
*** cdt git genie on behalf of Markus Schorn *** Bug 356955: Lookup for overloaded operator. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=42eaf65363a629f592bb8fafad43c544f251ed91
*** cdt git genie on behalf of Markus Schorn *** Bug 356955: Follow up porting fix to 8.0.2. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=2f327be2bed4576945708a2abb631ba625638cd5
*** cdt git genie on behalf of Markus Schorn *** Bug 356955: Lookup for overloaded operator. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7902fd1c77d602dbcde4bc3d00b8a8675746d9e7