SymbolDatabase: Do not set definedType for global scope etc

This commit is contained in:
Daniel Marjamäki 2021-01-06 08:53:13 +01:00
parent 22b10f8987
commit 3a86262244
2 changed files with 3 additions and 1 deletions

View File

@ -854,6 +854,9 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
unknowns = 0;
for (Scope& scope : scopeList) {
if (!scope.isClassOrStructOrUnion())
continue;
if (!scope.definedType) {
mBlankTypes.emplace_back();
scope.definedType = &mBlankTypes.back();

View File

@ -12,7 +12,6 @@ def get_debug_section(title, stdout):
s = re.sub(r'nestedIn: Struct', 'nestedIn: Class', s)
s = re.sub(r'classDef: struct', 'classDef: class', s)
s = re.sub(r'isInline: [a-z]+', 'isInline: ---', s)
s = re.sub(r'definedType: .*', 'definedType: ---', s)
s = re.sub(r'needInitialization: .*', 'needInitialization: ---', s)
s = re.sub(r'functionOf: .*', 'functionOf: ---', s)
s = re.sub(r'0x12345678 Struct', '0x12345678 Class', s)