forked from qt-creator/qt-creator
CppEditor: Remove extra CPlusPlus::Class member
Amends 0fab5956ea.
We want to avoid carrying these eight bytes ber Class instance around.
Instead, we now just replace the (anonymous) struct name with the
typedef'ed one.
Note that in C (but not C++), this is possible:
struct S {};
typedef struct {} S;
struct S s1;
S s2;
However, our code model has never respected the extra struct namespace,
so it can already not distinguish between occurrences of "S" and "struct
S".
Change-Id: I55feafea7d3a4a5848e10f7011f633a2ce0f626e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -53,10 +53,7 @@ static void path_helper(Symbol *symbol,
|
||||
if (ns && ns->isInline())
|
||||
return;
|
||||
}
|
||||
if (symbol->asClass())
|
||||
addNames(symbol->asClass()->prettyName(), names);
|
||||
else
|
||||
addNames(symbol->name(), names);
|
||||
addNames(symbol->name(), names);
|
||||
|
||||
} else if (symbol->asObjCClass() || symbol->asObjCBaseClass() || symbol->asObjCProtocol()
|
||||
|| symbol->asObjCForwardClassDeclaration() || symbol->asObjCForwardProtocolDeclaration()
|
||||
|
||||
Reference in New Issue
Block a user