Skip to content

Commit 185a956

Browse files
committed
Fix dumb error with USRs
1 parent d8871ee commit 185a956

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

SymbolGenerator/Parsing/ASTVisitor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public ASTVariable[] GetVariables()
428428
bool isVirtualBase = c.IsVirtualBase;
429429
CXType type = c.Type;
430430
CXCursor decl = type.Declaration;
431-
ASTClass? classInfo = VisitClass(decl, decl.SemanticParent, decl.Usr.ToString()).rawClass;
431+
ASTClass? classInfo = VisitClass(decl, decl.SemanticParent, GetUsr(decl)).rawClass;
432432
return classInfo is not null ? new ASTBaseSpecifier()
433433
{
434434
Class = classInfo,
@@ -439,17 +439,17 @@ public ASTVariable[] GetVariables()
439439

440440
// Find methods
441441
List<ASTMethod> methods = [.. methodsCursors
442-
.Select(c => VisitMethod(c, cursor, c.Usr.ToString()).method
442+
.Select(c => VisitMethod(c, cursor, GetUsr(c)).method
443443
).Where(t => t is not null)!];
444444

445445
// Find variables
446446
List<ASTVariable> variables = [.. variableCursors
447-
.Select(c => VisitVariable(c, cursor, c.Usr.ToString()).variable
447+
.Select(c => VisitVariable(c, cursor, GetUsr(c)).variable
448448
).Where(t => t is not null)!];
449449

450450
// Find nested classes
451451
List<ASTClass> nestedClasses = [.. classesCursors
452-
.Select(c => VisitClass(c, cursor, c.Usr.ToString()).rawClass
452+
.Select(c => VisitClass(c, cursor, GetUsr(c)).rawClass
453453
).Where(t => t is not null)!];
454454

455455
ASTClass rawClass = new()
@@ -483,7 +483,7 @@ public ASTVariable[] GetVariables()
483483
if (overriden.Length > 0)
484484
{
485485
var first = overriden[0];
486-
var (_, overrideOfMethod) = VisitMethod(first, first.SemanticParent, first.Usr.ToString());
486+
var (_, overrideOfMethod) = VisitMethod(first, first.SemanticParent, GetUsr(first));
487487
overrideOf = overrideOfMethod;
488488
}
489489
}

SymbolGenerator/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"profiles": {
33
"Generate Symbols": {
44
"commandName": "Project",
5-
"commandLineArgs": "-i \"./input/src\"\r\n-o \"./output\"\r\n-f \"mc\"\r\n-p \"win-client\"\r\n--\r\n-x c++\r\n-std=c++23\r\n-include-pch \"./input/src/pch.hpp.pch\"\r\n-fms-extensions\r\n-fms-compatibility\r\n-fms-define-stdc\r\n-I\"./input/include\"\r\n-I\"./input/src\""
5+
"commandLineArgs": "-i \"./input/src\"\r\n-o \"./output\"\r\n-f \"mc\"\r\n-p \"win-client\"\r\n--\r\n-x c++\r\n-std=c++23\r\n-fms-extensions\r\n-fms-compatibility\r\n-fms-define-stdc\r\n-I\"./input/include\"\r\n-I\"./input/src\""
66
}
77
}
88
}

0 commit comments

Comments
 (0)