mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
fix tests
This commit is contained in:
parent
6519dc1b8d
commit
4e2f24ac17
@ -24,6 +24,15 @@ void Reflect(Writer& visitor, std::string& value) {
|
||||
}
|
||||
|
||||
|
||||
// ReflectMember
|
||||
void ReflectMember(Writer& visitor, const char* name, std::string& value) {
|
||||
if (value.empty())
|
||||
return;
|
||||
visitor.Key(name);
|
||||
Reflect(visitor, value);
|
||||
}
|
||||
|
||||
|
||||
// Location
|
||||
void Reflect(Reader& visitor, Location& value) {
|
||||
value = Location(visitor.GetString());
|
||||
|
@ -110,6 +110,7 @@ void ReflectMember(Writer& visitor, const char* name, optional<T>& value) {
|
||||
visitor.Key(name);
|
||||
Reflect(visitor, value);
|
||||
}
|
||||
void ReflectMember(Writer& visitor, const char* name, std::string& value);
|
||||
|
||||
// Reader:
|
||||
template<typename T>
|
||||
|
@ -7,7 +7,6 @@ void foo();
|
||||
// Note: we always use the latest seen ("most local") definition/declaration.
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@foo#",
|
||||
|
@ -43,7 +43,6 @@ OUTPUT:
|
||||
"definition": "1:7:11",
|
||||
"declaring_type": 0,
|
||||
"uses": ["1:4:8", "1:7:11"]
|
||||
}],
|
||||
"vars": []
|
||||
}]
|
||||
}
|
||||
*/
|
||||
|
@ -3,7 +3,6 @@ void foo(int a, int b);
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@foo#I#I#",
|
||||
|
@ -5,7 +5,6 @@ void foo() {}
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@foo#",
|
||||
|
@ -3,7 +3,6 @@ void foo() {}
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@foo#",
|
||||
|
@ -27,7 +27,6 @@ OUTPUT:
|
||||
"definition": "1:6:11",
|
||||
"declaring_type": 0,
|
||||
"uses": ["1:3:8", "1:6:11"]
|
||||
}],
|
||||
"vars": []
|
||||
}]
|
||||
}
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ OUTPUT:
|
||||
"funcs": [0],
|
||||
"uses": ["*1:2:7"]
|
||||
}],
|
||||
"functions": [{
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@N@hello@S@Foo@F@foo#",
|
||||
"short_name": "foo",
|
||||
|
@ -29,7 +29,7 @@ OUTPUT:
|
||||
"callees": ["0@1:7:7", "0@1:9:3"],
|
||||
"uses": ["1:6:6"]
|
||||
}],
|
||||
"variables": [{
|
||||
"vars": [{
|
||||
"id": 0,
|
||||
"usr": "c:@N@ns@Foo",
|
||||
"short_name": "Foo",
|
||||
|
@ -17,7 +17,6 @@ OUTPUT:
|
||||
"definition": "1:3:9",
|
||||
"uses": ["*1:3:9", "*1:5:3", "*1:6:3"]
|
||||
}],
|
||||
"funcs": [],
|
||||
"vars": [{
|
||||
"id": 0,
|
||||
"usr": "c:@N@ns@a",
|
||||
|
@ -12,7 +12,6 @@ int b = foo<bool>();
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:template_func_usage_folded_into_one.cc@FT@>1#Tfoo#I#",
|
||||
|
@ -6,7 +6,6 @@ void usage() {
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@foo#",
|
||||
|
@ -33,7 +33,7 @@ OUTPUT:
|
||||
}],
|
||||
"vars": [{
|
||||
"id": 0,
|
||||
"usr": "c:type_usage_various.cc@58@S@Foo@F@make#@f",
|
||||
"usr": "c:type_usage_various.cc@57@S@Foo@F@make#@f",
|
||||
"short_name": "f",
|
||||
"qualified_name": "f",
|
||||
"definition": "1:6:7",
|
||||
|
@ -10,7 +10,6 @@ void caller() {
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"types": [],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"usr": "c:@F@called#",
|
||||
|
Loading…
Reference in New Issue
Block a user