CplusPlus: Fix minimal name construction

... when using declarations are involved.
Second attempt.
I have a suspicion that this is not the "correct" approach, however:
    a) It appears to fix the problem.
    b) It does not break any tests.
    c) It's rather high in the call tree, so there's a low likelihood
       of breaking something else.
    d) Considering the hacky-looking pre-existing code dealing with
       using declarations (e.g. LookupContext::lookupByUsing()),
       it seems quite possible that there is no "correct" way with
       the current infrastructure.

Fixes: QTCREATORBUG-14524
Change-Id: I28c6e53137c21ce158bbd03b92b3db39146116d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-01-29 10:18:31 +01:00
parent fa260e00ed
commit aae3ce15aa
3 changed files with 49 additions and 15 deletions

View File

@@ -83,6 +83,7 @@ public:
ClassOrNamespace *lookupType(const Name *name, Block *block);
ClassOrNamespace *findType(const Name *name);
ClassOrNamespace *findBlock(Block *block);
ClassOrNamespace *getNested(const Name *name);
Symbol *lookupInScope(const QList<const Name *> &fullName);