Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.2.1, Qt Creator 3.3.0-rc1
-
None
Description
If a function override accepts const and the value that is passed to it is non-const, the wrong override is resolved - it always picks the last one.
class Foo {}; void foo(int v) {} void foo(const char *v) {} void foo(const Foo &v) {} void foo(char v) {} void test() { foo(5); foo("hoo"); foo('a'); char *var = "var"; foo(var); // Jumps to last override, regardless of its type Foo f; foo(f); // Jumps to last override }
Attachments
Issue Links
- relates to
-
QTCREATORBUG-5322 "Follow symbol under cursor" doesn't recognize const in functions
-
- Closed
-
For Gerrit Dashboard: QTCREATORBUG-13128 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
96511,5 | C++: fix follow symbol for const arguments | master | qt-creator/qt-creator | Status: ABANDONED | +1 | 0 |
97421,7 | C++: fix follow symbol for const arguments | 3.3 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |