mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Update tests for llvm 4
This commit is contained in:
parent
8897bcc54d
commit
3d4ebcd7ee
@ -227,7 +227,23 @@ bool IsSymLink(const std::string& path) {
|
||||
}
|
||||
|
||||
std::vector<std::string> GetPlatformClangArguments() {
|
||||
return {"-fms-compatibility", "-fdelayed-template-parsing"};
|
||||
//
|
||||
// Found by executing
|
||||
//
|
||||
// $ clang++ -E -x c++ - -v
|
||||
//
|
||||
|
||||
return {
|
||||
"-isystem","C:/Program Files/Microsoft Visual Studio 10.0/VC/include",
|
||||
"-isystem","C:/Program Files/Microsoft Visual Studio 9.0/VC/include",
|
||||
"-isystem","C:/Program Files/Microsoft Visual Studio 9.0/VC/PlatformSDK/Include",
|
||||
"-isystem","C:/Program Files/Microsoft Visual Studio 8/VC/include",
|
||||
"-isystem","C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include",
|
||||
"-isystem","C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/include",
|
||||
"-isystem","C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"-isystem","C:/Program Files/LLVM/lib/clang/4.0.0/include",
|
||||
"-fms-extensions", "-fms-compatibility", "-fms-compatibility-version=18", "-fdelayed-template-parsing"
|
||||
};
|
||||
}
|
||||
|
||||
void FreeUnusedMemory() {}
|
||||
|
@ -22,26 +22,12 @@ OUTPUT:
|
||||
"parents": [],
|
||||
"derived": [],
|
||||
"types": [],
|
||||
"funcs": [0],
|
||||
"funcs": [],
|
||||
"vars": [],
|
||||
"instances": [],
|
||||
"uses": ["4:8-4:11", "5:12-5:15"]
|
||||
}],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"is_operator": false,
|
||||
"usr": "c:@S@Foo@F@Foo#&&$@S@Foo#",
|
||||
"short_name": "Foo",
|
||||
"detailed_name": "void Foo::Foo(Foo &&)",
|
||||
"declarations": [],
|
||||
"definition_spelling": "5:12-5:15",
|
||||
"definition_extent": "5:12-5:16",
|
||||
"declaring_type": 0,
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": [],
|
||||
"callees": []
|
||||
"uses": ["4:8-4:11"]
|
||||
}],
|
||||
"funcs": [],
|
||||
"vars": [{
|
||||
"id": 0,
|
||||
"usr": "c:@x",
|
||||
|
@ -1,15 +1,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface AClass: NSObject
|
||||
@interface AClass
|
||||
+ (void)test;
|
||||
- (void)anInstanceMethod;
|
||||
@property (nonatomic) int aProp;
|
||||
@property (readonly) int readOnlyProp;
|
||||
@end
|
||||
|
||||
@implementation AClass
|
||||
- (void)anInstanceMethod {
|
||||
NSLog(@"instance method");
|
||||
}
|
||||
- (void)anInstanceMethod {}
|
||||
@end
|
||||
|
||||
int main(void)
|
||||
@ -22,53 +18,66 @@ int main(void)
|
||||
/*
|
||||
OUTPUT:
|
||||
{
|
||||
"includes": [{
|
||||
"line": 1,
|
||||
"resolved_path": "&Foundation.h"
|
||||
}],
|
||||
"includes": [],
|
||||
"skipped_by_preprocessor": [],
|
||||
"types": [{
|
||||
"id": 0,
|
||||
"usr": "c:objc(cs)AClass",
|
||||
"short_name": "AClass",
|
||||
"detailed_name": "AClass",
|
||||
"definition_spelling": "9:17-9:23",
|
||||
"definition_extent": "9:1-13:2",
|
||||
"definition_spelling": "7:17-7:23",
|
||||
"definition_extent": "7:1-9:2",
|
||||
"parents": [],
|
||||
"derived": [],
|
||||
"types": [],
|
||||
"funcs": [],
|
||||
"vars": [],
|
||||
"instances": [],
|
||||
"uses": ["3:12-3:18", "9:17-9:23", "17:3-17:9", "17:23-17:29"]
|
||||
"uses": ["1:12-1:18", "7:17-7:23", "13:3-13:9", "13:23-13:29"]
|
||||
}],
|
||||
"funcs": [{
|
||||
"id": 0,
|
||||
"is_operator": false,
|
||||
"usr": "c:objc(cs)AClass(cm)test",
|
||||
"short_name": "test",
|
||||
"detailed_name": " AClass::test",
|
||||
"declarations": [{
|
||||
"spelling": "2:11-2:15",
|
||||
"extent": "2:3-2:16",
|
||||
"content": "+ (void)test;",
|
||||
"param_spellings": []
|
||||
}],
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": [],
|
||||
"callees": []
|
||||
}, {
|
||||
"id": 1,
|
||||
"is_operator": false,
|
||||
"usr": "c:objc(cs)AClass(im)anInstanceMethod",
|
||||
"short_name": "anInstanceMethod",
|
||||
"detailed_name": " AClass::anInstanceMethod",
|
||||
"declarations": [{
|
||||
"spelling": "4:11-4:27",
|
||||
"extent": "4:3-4:28",
|
||||
"spelling": "3:11-3:27",
|
||||
"extent": "3:3-3:28",
|
||||
"content": "- (void)anInstanceMethod;",
|
||||
"param_spellings": []
|
||||
}],
|
||||
"definition_spelling": "10:9-10:25",
|
||||
"definition_extent": "10:1-12:2",
|
||||
"definition_spelling": "8:9-8:25",
|
||||
"definition_extent": "8:1-8:28",
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": ["4@18:13-18:29"],
|
||||
"callers": ["4@14:13-14:29"],
|
||||
"callees": []
|
||||
}, {
|
||||
"id": 1,
|
||||
"id": 2,
|
||||
"is_operator": false,
|
||||
"usr": "c:objc(cs)AClass(im)aProp",
|
||||
"short_name": "aProp",
|
||||
"detailed_name": " AClass::aProp",
|
||||
"declarations": [{
|
||||
"spelling": "0:0-0:0",
|
||||
"extent": "5:29-5:34",
|
||||
"extent": "4:29-4:34",
|
||||
"content": "aProp",
|
||||
"param_spellings": []
|
||||
}],
|
||||
@ -77,37 +86,21 @@ OUTPUT:
|
||||
"callers": [],
|
||||
"callees": []
|
||||
}, {
|
||||
"id": 2,
|
||||
"id": 3,
|
||||
"is_operator": false,
|
||||
"usr": "c:objc(cs)AClass(im)setAProp:",
|
||||
"short_name": "setAProp:",
|
||||
"detailed_name": " AClass::setAProp:",
|
||||
"declarations": [{
|
||||
"spelling": "0:0-0:0",
|
||||
"extent": "5:29-5:34",
|
||||
"extent": "4:29-4:34",
|
||||
"content": "aProp",
|
||||
"param_spellings": ["5:29-5:34"]
|
||||
"param_spellings": ["4:29-4:34"]
|
||||
}],
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": ["4@0:0-0:0"],
|
||||
"callees": []
|
||||
}, {
|
||||
"id": 3,
|
||||
"is_operator": false,
|
||||
"usr": "c:objc(cs)AClass(im)readOnlyProp",
|
||||
"short_name": "readOnlyProp",
|
||||
"detailed_name": " AClass::readOnlyProp",
|
||||
"declarations": [{
|
||||
"spelling": "0:0-0:0",
|
||||
"extent": "6:28-6:40",
|
||||
"content": "readOnlyProp",
|
||||
"param_spellings": []
|
||||
}],
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": [],
|
||||
"callees": []
|
||||
}, {
|
||||
"id": 4,
|
||||
"is_operator": false,
|
||||
@ -115,61 +108,32 @@ OUTPUT:
|
||||
"short_name": "main",
|
||||
"detailed_name": "int main()",
|
||||
"declarations": [],
|
||||
"definition_spelling": "15:5-15:9",
|
||||
"definition_extent": "15:1-20:2",
|
||||
"definition_spelling": "11:5-11:9",
|
||||
"definition_extent": "11:1-16:2",
|
||||
"derived": [],
|
||||
"locals": [],
|
||||
"callers": [],
|
||||
"callees": ["0@18:13-18:29", "2@0:0-0:0"]
|
||||
"callees": ["1@14:13-14:29", "3@0:0-0:0"]
|
||||
}],
|
||||
"vars": [{
|
||||
"id": 0,
|
||||
"usr": "c:objc(cs)AClass(py)aProp",
|
||||
"short_name": "aProp",
|
||||
"detailed_name": "int AClass::aProp",
|
||||
"declaration": "5:29-5:34",
|
||||
"declaration": "4:29-4:34",
|
||||
"is_local": true,
|
||||
"is_macro": false,
|
||||
"uses": ["5:29-5:34", "19:12-19:17"]
|
||||
"uses": ["4:29-4:34", "15:12-15:17"]
|
||||
}, {
|
||||
"id": 1,
|
||||
"usr": "c:objc(cs)AClass(py)readOnlyProp",
|
||||
"short_name": "readOnlyProp",
|
||||
"detailed_name": "int AClass::readOnlyProp",
|
||||
"declaration": "6:28-6:40",
|
||||
"is_local": true,
|
||||
"is_macro": false,
|
||||
"uses": ["6:28-6:40"]
|
||||
}, {
|
||||
"id": 2,
|
||||
"usr": "c:objc(cs)AClass@_aProp",
|
||||
"short_name": "_aProp",
|
||||
"detailed_name": "int AClass::_aProp",
|
||||
"definition_spelling": "5:29-5:34",
|
||||
"definition_extent": "5:29-5:34",
|
||||
"is_local": true,
|
||||
"is_macro": false,
|
||||
"uses": ["5:29-5:34"]
|
||||
}, {
|
||||
"id": 3,
|
||||
"usr": "c:objc(cs)AClass@_readOnlyProp",
|
||||
"short_name": "_readOnlyProp",
|
||||
"detailed_name": "int AClass::_readOnlyProp",
|
||||
"definition_spelling": "6:28-6:40",
|
||||
"definition_extent": "6:28-6:40",
|
||||
"is_local": true,
|
||||
"is_macro": false,
|
||||
"uses": ["6:28-6:40"]
|
||||
}, {
|
||||
"id": 4,
|
||||
"usr": "c:class.m@297@F@main#@instance",
|
||||
"usr": "c:class.m@191@F@main#@instance",
|
||||
"short_name": "instance",
|
||||
"detailed_name": "AClass * instance",
|
||||
"definition_spelling": "17:11-17:19",
|
||||
"definition_extent": "17:3-17:35",
|
||||
"definition_spelling": "13:11-13:19",
|
||||
"definition_extent": "13:3-13:35",
|
||||
"is_local": true,
|
||||
"is_macro": false,
|
||||
"uses": ["17:11-17:19", "18:4-18:12", "19:3-19:11"]
|
||||
"uses": ["13:11-13:19", "14:4-14:12", "15:3-15:11"]
|
||||
}]
|
||||
}
|
||||
*/
|
@ -47,7 +47,7 @@ OUTPUT:
|
||||
"funcs": [],
|
||||
"vars": [],
|
||||
"instances": [0, 1],
|
||||
"uses": ["7:8-7:14", "8:8-8:14", "9:20-9:26"]
|
||||
"uses": ["7:8-7:14", "8:8-8:14", "9:20-9:26", "12:78-12:84"]
|
||||
}, {
|
||||
"id": 2,
|
||||
"usr": "c:@N@std@ST>2#T#T@vector",
|
||||
|
Loading…
Reference in New Issue
Block a user