C++: Fix duplicate base classes in lookup
C++: Fix duplicate base classes in lookup

Previously we detected the duplicates by name and then processed
the missing ones, but this was not handling qualification properly.
Now we process the bases and only after lookup (making sure we
are talking about the *same* types) we add then if necessary.

Change-Id: Ic318b174d2174e24c24a4f2f1b612fbcb3f20491
Reviewed-by: Orgad Shaneh <2b010cbad792a0c0a8175f752f93f83941fc6bc1@gmail.com>
Reviewed-by: Roberto Raggi <5b38c5be65ca2d75b92c40e91029e90f276fd4fe@nokia.com>

xianian/qt-creator,amyvmiwei/qt-creator,malikcjm/qtcreator,AltarBeastiful/qt-creator,maui-packages/qt-creator,danimo/qt-creator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,richardmg/qtcreator,syntheticpp/qt-creator,amyvmiwei/qt-creator,kuba1/qtcreator,duythanhphan/qt-creator,darksylinc/qt-creator,xianian/qt-creator,xianian/qt-creator,danimo/qt-creator,martyone/sailfish-qtcreator,omniacreator/qtcreator,amyvmiwei/qt-creator,Distrotech/qtcreator,martyone/sailfish-qtcreator,darksylinc/qt-creator,kuba1/qtcreator,omniacreator/qtcreator,amyvmiwei/qt-creator,martyone/sailfish-qtcreator,kuba1/qtcreator,darksylinc/qt-creator,syntheticpp/qt-creator,AltarBeastiful/qt-creator,maui-packages/qt-creator,colede/qtcreator,martyone/sailfish-qtcreator,darksylinc/qt-creator,syntheticpp/qt-creator,amyvmiwei/qt-creator,duythanhphan/qt-creator,AltarBeastiful/qt-creator,xianian/qt-creator,danimo/qt-creator,martyone/sailfish-qtcreator,colede/qtcreator,AltarBeastiful/qt-creator,Distrotech/qtcreator,amyvmiwei/qt-creator,AltarBeastiful/qt-creator,danimo/qt-creator,kuba1/qtcreator,maui-packages/qt-creator,duythanhphan/qt-creator,darksylinc/qt-creator,syntheticpp/qt-creator,AltarBeastiful/qt-creator,danimo/qt-creator,malikcjm/qtcreator,farseerri/git_code,xianian/qt-creator,xianian/qt-creator,omniacreator/qtcreator,richardmg/qtcreator,farseerri/git_code,Distrotech/qtcreator,danimo/qt-creator,colede/qtcreator,malikcjm/qtcreator,richardmg/qtcreator,colede/qtcreator,farseerri/git_code,malikcjm/qtcreator,richardmg/qtcreator,omniacreator/qtcreator,duythanhphan/qt-creator,farseerri/git_code,duythanhphan/qt-creator,kuba1/qtcreator,danimo/qt-creator,malikcjm/qtcreator,martyone/sailfish-qtcreator,kuba1/qtcreator,richardmg/qtcreator,farseerri/git_code,farseerri/git_code,darksylinc/qt-creator,martyone/sailfish-qtcreator,maui-packages/qt-creator,maui-packages/qt-creator,syntheticpp/qt-creator,richardmg/qtcreator,amyvmiwei/qt-creator,martyone/sailfish-qtcreator,maui-packages/qt-creator,kuba1/qtcreator,malikcjm/qtcreator,omniacreator/qtcreator,xianian/qt-creator,xianian/qt-creator,farseerri/git_code,Distrotech/qtcreator,duythanhphan/qt-creator,omniacreator/qtcreator,danimo/qt-creator,Distrotech/qtcreator,kuba1/qtcreator,danimo/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,richardmg/qtcreator,xianian/qt-creator,colede/qtcreator,syntheticpp/qt-creator,farseerri/git_code,malikcjm/qtcreator,Distrotech/qtcreator,AltarBeastiful/qt-creator,kuba1/qtcreator,Distrotech/qtcreator,omniacreator/qtcreator,syntheticpp/qt-creator,colede/qtcreator,colede/qtcreator,darksylinc/qt-creator,maui-packages/qt-creator,amyvmiwei/qt-creator