Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simplest possible test case for Objective-C in YouCompleteMe.
import os
import ycm_core
flags = [
'-resource-dir',
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0',
'-isysroot',
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk',
'-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include',
'-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks',
'-fblocks',
'-fobjc-runtime=macosx-10.10.0',
'-fencode-extended-block-signature',
'-fobjc-arc',
'-fobjc-exceptions',
'-fexceptions',
'-x',
'objective-c'
]
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
def FlagsForFile( filename, **kwargs ):
return {
'flags': flags,
'do_cache': True
}
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
int retVal;
@autoreleasepool {
NSString *string = @"hihi";
NSLog(string);
retVal = 0;
}
return retVal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment