llcppsigfetch:out of class method

This commit is contained in:
luoliwoshang
2024-08-26 18:43:38 +08:00
parent fc04083cb2
commit b524472b9e
3 changed files with 94 additions and 1 deletions

View File

@@ -41,6 +41,11 @@ func TestClassDecl() {
void foo() override;
};
`,
`namespace A{
class Foo{}
}
void A::Foo::bar();
`,
}
test.RunTest("TestClassDecl", testCases)
}

View File

@@ -539,6 +539,70 @@ TestClassDecl Case 4:
}
}
TestClassDecl Case 5:
{
"temp.h": {
"decls": [{
"Loc": {
"File": "temp.h"
},
"Doc": {
"List": []
},
"Parent": {
"Name": "A"
},
"Name": {
"Name": "Foo"
},
"Type": {
"Tag": 3,
"Fields": {
"List": []
},
"Methods": []
}
}, {
"Loc": {
"File": "temp.h"
},
"Doc": {
"List": []
},
"Parent": {
"X": {
"Name": "Foo"
},
"Parent": {
"Name": "A"
}
},
"Name": {
"Name": "bar"
},
"Type": {
"Params": {
"List": []
},
"Ret": {
"Kind": 0,
"Flags": 0
}
},
"IsInline": false,
"IsStatic": false,
"IsConst": false,
"IsExplicit": false,
"IsConstructor": false,
"IsDestructor": false,
"IsVirtual": false,
"IsOverride": false
}],
"includes": [],
"macros": []
}
}
#stderr