Skip to content

Commit 3a86262

Browse files
committed
SymbolDatabase: Do not set definedType for global scope etc
1 parent 22b10f8 commit 3a86262

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/symboldatabase.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,9 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
854854
unknowns = 0;
855855

856856
for (Scope& scope : scopeList) {
857+
if (!scope.isClassOrStructOrUnion())
858+
continue;
859+
857860
if (!scope.definedType) {
858861
mBlankTypes.emplace_back();
859862
scope.definedType = &mBlankTypes.back();

test/cli/test-clang-import.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def get_debug_section(title, stdout):
1212
s = re.sub(r'nestedIn: Struct', 'nestedIn: Class', s)
1313
s = re.sub(r'classDef: struct', 'classDef: class', s)
1414
s = re.sub(r'isInline: [a-z]+', 'isInline: ---', s)
15-
s = re.sub(r'definedType: .*', 'definedType: ---', s)
1615
s = re.sub(r'needInitialization: .*', 'needInitialization: ---', s)
1716
s = re.sub(r'functionOf: .*', 'functionOf: ---', s)
1817
s = re.sub(r'0x12345678 Struct', '0x12345678 Class', s)

0 commit comments

Comments
 (0)