forked from qt-creator/qt-creator
There were annoying inconsistencies, for instance:
- A not fully matching declaration was found from the definition,
but not vice versa.
- An implementation MyClass::foo(int) would fall back to a
declaration foo(), but an implementation MyClass::foo() would
not fall back to a declaration foo(int).
These cases behave consistently now. To this end, the clang code model
now forwards to the built-in code model if a function lookup has failed.
Fuzzy matching for free functions has been limited, as the cons appear
to outweigh the pros. For instance:
void foo(int);
void foo(double) {}
Following the definition would lead to the non-matching declaration,
which the user most likely does not want.
As a side effect, redundant code has been removed in the SymbolFinder
class.
Fixes: QTCREATORBUG-20279
Change-Id: Ib97d6710c7e12fb0fdbc30b51a0067e09bfc2190
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
17 KiB
17 KiB