C++: Fix findMatchingDeclaration for functions not in a class.
C++: Fix findMatchingDeclaration for functions not in a class.

That fixes navigation and the 'function signature update' quickfix for
global functions and functions in namespaces.

Task-number: QTCREATORBUG-6413
Change-Id: Ifc68a88a34eb363f4e84c72e9f72444d22df1086
Reviewed-by: Leandro T. C. Melo <8f144cd741810d8c7b648cacf5b9b2f4e2ebcc1b@nokia.com>

kuba1/qtcreator,martyone/sailfish-qtcreator,farseerri/git_code,richardmg/qtcreator,farseerri/git_code,Distrotech/qtcreator,amyvmiwei/qt-creator,hdweiss/qt-creator-visualizer,danimo/qt-creator,maui-packages/qt-creator,azat/qtcreator,malikcjm/qtcreator,kuba1/qtcreator,azat/qtcreator,duythanhphan/qt-creator,Distrotech/qtcreator,martyone/sailfish-qtcreator,farseerri/git_code,jonnor/qt-creator,malikcjm/qtcreator,syntheticpp/qt-creator,jonnor/qt-creator,bakaiadam/collaborative_qt_creator,bakaiadam/collaborative_qt_creator,danimo/qt-creator,kuba1/qtcreator,malikcjm/qtcreator,AltarBeastiful/qt-creator,darksylinc/qt-creator,maui-packages/qt-creator,xianian/qt-creator,darksylinc/qt-creator,malikcjm/qtcreator,danimo/qt-creator,danimo/qt-creator,ostash/qt-creator-i18n-uk,omniacreator/qtcreator,xianian/qt-creator,omniacreator/qtcreator,jonnor/qt-creator,syntheticpp/qt-creator,martyone/sailfish-qtcreator,kuba1/qtcreator,Distrotech/qtcreator,duythanhphan/qt-creator,ostash/qt-creator-i18n-uk,duythanhphan/qt-creator,kuba1/qtcreator,danimo/qt-creator,maui-packages/qt-creator,darksylinc/qt-creator,KDE/android-qt-creator,bakaiadam/collaborative_qt_creator,malikcjm/qtcreator,KDAB/KDAB-Creator,richardmg/qtcreator,bakaiadam/collaborative_qt_creator,duythanhphan/qt-creator,hdweiss/qt-creator-visualizer,jonnor/qt-creator,martyone/sailfish-qtcreator,AltarBeastiful/qt-creator,darksylinc/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,jonnor/qt-creator,ostash/qt-creator-i18n-uk,martyone/sailfish-qtcreator,KDAB/KDAB-Creator,KDAB/KDAB-Creator,xianian/qt-creator,amyvmiwei/qt-creator,hdweiss/qt-creator-visualizer,maui-packages/qt-creator,KDE/android-qt-creator,xianian/qt-creator,richardmg/qtcreator,KDE/android-qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,farseerri/git_code,KDE/android-qt-creator,richardmg/qtcreator,AltarBeastiful/qt-creator,amyvmiwei/qt-creator,martyone/sailfish-qtcreator,colede/qtcreator,danimo/qt-creator,kuba1/qtcreator,kuba1/qtcreator,Distrotech/qtcreator,xianian/qt-creator,bakaiadam/collaborative_qt_creator,colede/qtcreator,syntheticpp/qt-creator,azat/qtcreator,Distrotech/qtcreator,Distrotech/qtcreator,duythanhphan/qt-creator,AltarBeastiful/qt-creator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator,azat/qtcreator,omniacreator/qtcreator,KDE/android-qt-creator,darksylinc/qt-creator,farseerri/git_code,KDAB/KDAB-Creator,duythanhphan/qt-creator,colede/qtcreator,maui-packages/qt-creator,xianian/qt-creator,amyvmiwei/qt-creator,omniacreator/qtcreator,farseerri/git_code,amyvmiwei/qt-creator,omniacreator/qtcreator,bakaiadam/collaborative_qt_creator,xianian/qt-creator,KDAB/KDAB-Creator,malikcjm/qtcreator,xianian/qt-creator,colede/qtcreator,kuba1/qtcreator,KDE/android-qt-creator,ostash/qt-creator-i18n-uk,richardmg/qtcreator,colede/qtcreator,ostash/qt-creator-i18n-uk,richardmg/qtcreator,colede/qtcreator,azat/qtcreator,KDAB/KDAB-Creator,ostash/qt-creator-i18n-uk,danimo/qt-creator,KDE/android-qt-creator,omniacreator/qtcreator,martyone/sailfish-qtcreator,malikcjm/qtcreator,hdweiss/qt-creator-visualizer,syntheticpp/qt-creator,maui-packages/qt-creator,kuba1/qtcreator,farseerri/git_code,maui-packages/qt-creator,darksylinc/qt-creator,duythanhphan/qt-creator,jonnor/qt-creator,Distrotech/qtcreator,colede/qtcreator,syntheticpp/qt-creator,danimo/qt-creator,omniacreator/qtcreator,syntheticpp/qt-creator,syntheticpp/qt-creator,hdweiss/qt-creator-visualizer,darksylinc/qt-creator,AltarBeastiful/qt-creator,bakaiadam/collaborative_qt_creator,AltarBeastiful/qt-creator,KDE/android-qt-creator,farseerri/git_code,amyvmiwei/qt-creator,azat/qtcreator,hdweiss/qt-creator-visualizer,richardmg/qtcreator,amyvmiwei/qt-creator,amyvmiwei/qt-creator,danimo/qt-creator,ostash/qt-creator-i18n-uk