llcppsigfetch:correct class scoping

This commit is contained in:
luoliwoshang
2024-08-22 18:49:00 +08:00
parent 319e746a55
commit 14b335a51e
5 changed files with 49 additions and 60 deletions

View File

@@ -9,9 +9,7 @@ TestClassDecl Case 1:
"Doc": {
"List": []
},
"Parent": {
"Name": "A"
},
"Parent": null,
"Name": {
"Name": "A"
},
@@ -66,9 +64,7 @@ TestClassDecl Case 2:
"Doc": {
"List": []
},
"Parent": {
"Name": "A"
},
"Parent": null,
"Name": {
"Name": "A"
},

View File

@@ -105,9 +105,7 @@ TestScope Case 4:
"Doc": {
"List": []
},
"Parent": {
"Name": "a"
},
"Parent": null,
"Name": {
"Name": "a"
},
@@ -157,12 +155,7 @@ TestScope Case 5:
"List": []
},
"Parent": {
"X": {
"Name": "b"
},
"Parent": {
"Name": "a"
}
"Name": "a"
},
"Name": {
"Name": "b"
@@ -219,15 +212,10 @@ TestScope Case 6:
},
"Parent": {
"X": {
"Name": "c"
"Name": "b"
},
"Parent": {
"X": {
"Name": "b"
},
"Parent": {
"Name": "a"
}
"Name": "a"
}
},
"Name": {

View File

@@ -107,9 +107,7 @@ TestTypeDefDecl Case 3:
"Doc": {
"List": []
},
"Parent": {
"Name": "ClassFoo"
},
"Parent": null,
"Name": {
"Name": "ClassFoo"
},
@@ -240,9 +238,7 @@ TestTypeDefDecl Case 4:
"Doc": {
"List": []
},
"Parent": {
"Name": "ClassFoo"
},
"Parent": null,
"Name": {
"Name": "ClassFoo"
},

View File

@@ -9,9 +9,10 @@ func main() {
func TestTypeDefDecl() {
testCases := []string{
`typedef int INT;`,
`typedef int INT;
`typedef int INT;
typedef INT STANDARD_INT;`,
`struct StructFoo {};
union UnionFoo {};
class ClassFoo {};